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

Update Mono to 6.8.0 #1697

Merged
merged 4 commits into from
Feb 5, 2020
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
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
vmImage: "macOS-10.13"
dependsOn: GitVersion
variables:
MONO_VERSION: 6.6.0
MONO_VERSION: 6.8.0
steps:
- template: ./.pipelines/init.yml
parameters:
Expand All @@ -56,7 +56,7 @@ jobs:
DotNetVersion: $(DotNetVersion)
NuGetVersion: $(NuGetVersion)
- script: |
curl -o mono.pkg https://download.mono-project.com/archive/$MONO_VERSION/macos-10-universal/MonoFramework-MDK-$MONO_VERSION.161.macos10.xamarin.universal.pkg
curl -o mono.pkg https://download.mono-project.com/archive/$MONO_VERSION/macos-10-universal/MonoFramework-MDK-$MONO_VERSION.105.macos10.xamarin.universal.pkg
sudo installer -pkg mono.pkg -target /
sudo cp -rf /Library/Frameworks/Mono.framework/Versions/$MONO_VERSION/ /Library/Frameworks/Mono.framework/Versions/Current/
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$MONO_VERSION
Expand All @@ -79,7 +79,7 @@ jobs:
vmImage: "Ubuntu-16.04"
dependsOn: GitVersion
variables:
MONO_VERSION: 6.6.0
MONO_VERSION: 6.8.0
steps:
- template: ./.pipelines/init.yml
parameters:
Expand All @@ -90,7 +90,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/$MONO_VERSION.161 main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/$MONO_VERSION.105 main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
sudo apt install msbuild
Expand Down
69 changes: 62 additions & 7 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ Task("InstallMonoAssets")
DownloadFileAndUnzip($"{buildPlan.DownloadURL}/{buildPlan.MonoRuntimeMacOS}", env.Folders.MonoRuntimeMacOS);
DownloadFileAndUnzip($"{buildPlan.DownloadURL}/{buildPlan.MonoRuntimeLinux32}", env.Folders.MonoRuntimeLinux32);
DownloadFileAndUnzip($"{buildPlan.DownloadURL}/{buildPlan.MonoRuntimeLinux64}", env.Folders.MonoRuntimeLinux64);
DownloadFileAndUnzip($"{buildPlan.DownloadURL}/{buildPlan.MonoMSBuildRuntime}", env.Folders.MonoMSBuildRuntime);
DownloadFileAndUnzip($"{buildPlan.DownloadURL}/{buildPlan.MonoMSBuildLib}", env.Folders.MonoMSBuildLib);

var monoInstallFolder = env.CurrentMonoRuntime.InstallFolder;
var monoRuntimeFile = env.CurrentMonoRuntime.RuntimeFile;
Expand Down Expand Up @@ -196,6 +194,9 @@ Task("CreateMSBuildFolder")
var msbuildCurrentTargetFolder = CombinePaths(env.Folders.MSBuild, "Current");
var msbuildCurrentBinTargetFolder = CombinePaths(msbuildCurrentTargetFolder, "Bin");

DirectoryHelper.ForceCreate(msbuildCurrentTargetFolder);
DirectoryHelper.ForceCreate(msbuildCurrentBinTargetFolder);

var msbuildLibraries = new []
{
"Microsoft.Build",
Expand All @@ -208,6 +209,46 @@ Task("CreateMSBuildFolder")
"Microsoft.Build.Utilities.v12.0"
};

var msbuildRuntimeFiles = new []
{
"Microsoft.Common.CrossTargeting.targets",
"Microsoft.Common.CurrentVersion.targets",
"Microsoft.Common.Mono.targets",
"Microsoft.Common.overridetasks",
"Microsoft.Common.targets",
"Microsoft.Common.tasks",
"Microsoft.CSharp.CrossTargeting.targets",
"Microsoft.CSharp.CurrentVersion.targets",
"Microsoft.CSharp.Mono.targets",
"Microsoft.CSharp.targets",
"Microsoft.Data.Entity.targets",
"Microsoft.Managed.targets",
"Microsoft.NET.props",
"Microsoft.NETFramework.CurrentVersion.props",
"Microsoft.NETFramework.CurrentVersion.targets",
"Microsoft.NETFramework.props",
"Microsoft.NETFramework.targets",
"Microsoft.ServiceModel.targets",
"Microsoft.VisualBasic.CrossTargeting.targets",
"Microsoft.VisualBasic.CurrentVersion.targets",
"Microsoft.VisualBasic.Mono.targets",
"Microsoft.VisualBasic.targets",
"Microsoft.WinFx.targets",
"Microsoft.WorkflowBuildExtensions.targets",
"Microsoft.Xaml.targets",
"MSBuild.dll",
"MSBuild.dll.config",
"System.Buffers.dll",
"System.Collections.Immutable.dll",
"System.Memory.dll",
"System.Numerics.Vectors.dll",
"System.Reflection.Metadata.dll",
"System.Resources.Extensions.dll",
"System.Threading.Tasks.Dataflow.dll",
"Workflow.VisualBasic.targets",
"Workflow.targets"
};

string sdkResolverTFM;

if (Platform.Current.IsWindows)
Expand Down Expand Up @@ -239,11 +280,25 @@ Task("CreateMSBuildFolder")
{
Information("Copying Mono MSBuild runtime...");

var msbuildSourceFolder = env.Folders.MonoMSBuildRuntime;
DirectoryHelper.Copy(msbuildSourceFolder, msbuildCurrentBinTargetFolder, copySubDirectories: false);
var monoBasePath = Platform.Current.IsMacOS
? "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono"
: "/usr/lib/mono";
var monoMSBuildPath = $"{monoBasePath}/msbuild/Current/bin";
var monoXBuildPath = $"{monoBasePath}/xbuild/Current";

var msbuild15SourceFolder = CombinePaths(msbuildSourceFolder, "15.0");
DirectoryHelper.Copy(msbuild15SourceFolder, msbuildCurrentTargetFolder);
var commonTargetsSourcePath = CombinePaths(monoXBuildPath, "Microsoft.Common.props");
var commonTargetsTargetPath = CombinePaths(msbuildCurrentTargetFolder, "Microsoft.Common.props");
FileHelper.Copy(commonTargetsSourcePath, commonTargetsTargetPath);

foreach (var runtimeFileName in msbuildRuntimeFiles)
{
var runtimeSourcePath = CombinePaths(monoMSBuildPath, runtimeFileName);
var runtimeTargetPath = CombinePaths(msbuildCurrentBinTargetFolder, runtimeFileName);
if (FileHelper.Exists(runtimeSourcePath))
{
FileHelper.Copy(runtimeSourcePath, runtimeTargetPath);
}
}

Information("Copying MSBuild libraries...");

Expand All @@ -252,7 +307,7 @@ Task("CreateMSBuildFolder")
var libraryFileName = library + ".dll";

// copy MSBuild from current Mono (should be 6.4.0+)
var librarySourcePath = CombinePaths(Platform.Current.IsMacOS ? "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin" : "/usr/lib/mono/msbuild/Current/bin", libraryFileName);
var librarySourcePath = CombinePaths(monoMSBuildPath, libraryFileName);
var libraryTargetPath = CombinePaths(msbuildCurrentBinTargetFolder, libraryFileName);
if (FileHelper.Exists(librarySourcePath))
{
Expand Down
96 changes: 47 additions & 49 deletions build.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,49 @@
{
"DotNetInstallScriptURL": "https://dot.net/v1",
"DotNetChannel": "Current",
"DotNetVersion": "3.0.100",
"RequiredMonoVersion": "6.6.0",
"DownloadURL": "https://roslynomnisharp.blob.core.windows.net/ext",
"MonoRuntimeMacOS": "mono.macOS-6.6.0.161.zip",
"MonoRuntimeLinux32": "mono.linux-x86-6.6.0.161.zip",
"MonoRuntimeLinux64": "mono.linux-x86_64-6.6.0.161.zip",
"MonoMSBuildRuntime": "Microsoft.Build.Runtime.Mono-6.6.0.161.zip",
"MonoMSBuildLib": "Microsoft.Build.Lib.Mono-6.6.0.161.zip",
"HostProjects": [
"OmniSharp.Stdio.Driver",
"OmniSharp.Http.Driver"
],
"TestProjects": [
"OmniSharp.MSBuild.Tests",
"OmniSharp.Roslyn.CSharp.Tests",
"OmniSharp.Http.Tests",
"OmniSharp.Stdio.Tests",
"OmniSharp.DotNetTest.Tests",
"OmniSharp.Tests",
"OmniSharp.Cake.Tests",
"OmniSharp.Script.Tests"
],
"TestAssets": [
"NUnitTestProject",
"XunitTestProject",
"MSTestProject",
"ProjectAndSolution",
"ProjectAndSolutionWithProjectSection",
"TwoProjectsWithSolution",
"ProjectWithGeneratedFile",
"CSharpAndFSharp",
"ProjectWithMismatchedFileName",
"SolutionWithSignedProject",
"ProjectWithMultiTFMLib",
"ExternAlias",
"ProjectWithComplexAnalyzers",
"NetCore30Project"
],
"CakeTestAssets": [
"CakeProject"
],
"WindowsOnlyTestAssets": [
"AntlrGeneratedFiles"
],
"RestoreOnlyTestAssets":[
"ProjectWithMissingType"
]
"DotNetInstallScriptURL": "https://dot.net/v1",
"DotNetChannel": "Current",
"DotNetVersion": "3.0.100",
"RequiredMonoVersion": "6.6.0",
"DownloadURL": "https://roslynomnisharp.blob.core.windows.net/ext",
"MonoRuntimeMacOS": "mono.macOS-6.8.0.105.zip",
"MonoRuntimeLinux32": "mono.linux-x86-6.8.0.105.zip",
"MonoRuntimeLinux64": "mono.linux-x86_64-6.8.0.105.zip",
"HostProjects": [
"OmniSharp.Stdio.Driver",
"OmniSharp.Http.Driver"
],
"TestProjects": [
"OmniSharp.MSBuild.Tests",
"OmniSharp.Roslyn.CSharp.Tests",
"OmniSharp.Http.Tests",
"OmniSharp.Stdio.Tests",
"OmniSharp.DotNetTest.Tests",
"OmniSharp.Tests",
"OmniSharp.Cake.Tests",
"OmniSharp.Script.Tests"
],
"TestAssets": [
"NUnitTestProject",
"XunitTestProject",
"MSTestProject",
"ProjectAndSolution",
"ProjectAndSolutionWithProjectSection",
"TwoProjectsWithSolution",
"ProjectWithGeneratedFile",
"CSharpAndFSharp",
"ProjectWithMismatchedFileName",
"SolutionWithSignedProject",
"ProjectWithMultiTFMLib",
"ExternAlias",
"ProjectWithComplexAnalyzers",
"NetCore30Project"
],
"CakeTestAssets": [
"CakeProject"
],
"WindowsOnlyTestAssets": [
"AntlrGeneratedFiles"
],
"RestoreOnlyTestAssets": [
"ProjectWithMissingType"
]
}
Loading