Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ tests/api-compatibility/reference/*.cs
Novell
*.patch
*.keystore
/omnisharp.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line need a leading /?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We create the file in the root directory only, I figured other directories may get their own locally created config files and we shouldn't hide them

17 changes: 17 additions & 0 deletions build-tools/scripts/omnisharp.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"msbuild": {
"loadProjectsOnDemand": true,
"Configuration": "@CONFIGURATION@"
},

"RenameOptions": {
"RenameInComments": false,
"RenameOverloads": true,
"RenameInStrings": false
},

"sdk": {
"IncludePreleases": true,
"Path": "@DOTNET_SDK_PATH@"
}
}
17 changes: 17 additions & 0 deletions build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ protected override async Task<bool> Execute (Context context)
Get_mingw_32_cmake (context),
Get_mingw_64_cmake (context),
Get_MonoGitHash_props (context),
Get_Omnisharp_Json (context),
};
}
}
Expand Down Expand Up @@ -237,5 +238,21 @@ public GeneratedFile Get_MonoGitHash_props (Context context)
Path.Combine (Configurables.Paths.BuildBinDir, OutputFileName)
);
}

public GeneratedFile Get_Omnisharp_Json (Context context)
{
const string OutputFileName = "omnisharp.json";

var replacements = new Dictionary<string, string> (StringComparer.Ordinal) {
{ "@CONFIGURATION@", context.Configuration },
{ "@DOTNET_SDK_PATH@", Path.Combine (Configurables.Paths.DotNetPreviewPath, "sdk", context.Properties.GetRequiredValue (KnownProperties.MicrosoftDotnetSdkInternalPackageVersion)) },
};

return new GeneratedPlaceholdersFile (
replacements,
Path.Combine (Configurables.Paths.BuildToolsScriptsDir, $"{OutputFileName}.in"),
Path.Combine (BuildPaths.XamarinAndroidSourceRoot, OutputFileName)
);
}
}
}