Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy MsBuild 16.3 on Mono too #1607

Closed
wants to merge 4 commits into from
Closed
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
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
vmImage: "macOS-10.13"
dependsOn: GitVersion
variables:
MONO_VERSION: 5.18.1
MONO_VERSION: 6.0.0
steps:
- template: ./.pipelines/init.yml
parameters:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
vmImage: "Ubuntu-16.04"
dependsOn: GitVersion
variables:
MONO_VERSION: 5.18.1
MONO_VERSION: 6.0.0
steps:
- template: ./.pipelines/init.yml
parameters:
Expand All @@ -76,7 +76,7 @@ jobs:
- script: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/5.18.1 main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/6.0.0 main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
displayName: Use Mono $(MONO_VERSION)
Expand Down
6 changes: 4 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ Task("CreateMSBuildFolder")
foreach (var library in msbuildLibraries)
{
var libraryFileName = library + ".dll";
var librarySourcePath = CombinePaths(env.Folders.MonoMSBuildLib, libraryFileName);

// copy MSBuild from current Mono (should be 6.0.0+)
var librarySourcePath = CombinePaths(Platform.Current.IsMacOS ? "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin" : "/usr/lib/mono/msbuild/15.0/bin", libraryFileName);
var libraryTargetPath = CombinePaths(msbuildCurrentBinTargetFolder, libraryFileName);
FileHelper.Copy(librarySourcePath, libraryTargetPath);
}
Expand Down Expand Up @@ -512,7 +514,7 @@ Task("Test")
{
// Copy the Mono-built Microsoft.Build.* binaries to the test folder.
// This is necessary to work around a Mono bug that is exasperated by xUnit.
DirectoryHelper.Copy($"{env.Folders.MonoMSBuildLib}", instanceFolder);
DirectoryHelper.Copy($"{env.Folders.MSBuild}/Current/bin", instanceFolder);

var runScript = CombinePaths(env.Folders.Mono, "run");

Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"DotNetInstallScriptURL": "https://dot.net/v1",
"DotNetChannel": "preview",
"DotNetVersion": "2.1.505",
"RequiredMonoVersion": "5.18.0.0",
"RequiredMonoVersion": "6.0.0",
"DownloadURL": "https://roslynomnisharp.blob.core.windows.net/ext",
"MonoRuntimeMacOS": "mono.macOS-5.18.1.0.zip",
"MonoRuntimeLinux32": "mono.linux-x86-5.18.1.0.zip",
Expand Down
3 changes: 2 additions & 1 deletion tests/OmniSharp.MSBuild.Tests/ProjectWithAnalyzersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ public async Task WhenProjectRulesetFileRuleIsUpdatedThenUpdateRulesAccordingly(
}
}

[Fact]
// Unstable with MSBuild 16.3 on *nix
[ConditionalFact(typeof(WindowsOnly))]
public async Task WhenNewAnalyzerReferenceIsAdded_ThenAutomaticallyUseItWithoutRestart()
{
var emitter = new ProjectLoadTestEventEmitter();
Expand Down