Skip to content

Commit

Permalink
Merge pull request #1895 from JoeRobich/update-msbuild-packaging
Browse files Browse the repository at this point in the history
Include version matched target files with minimal MSBuild
  • Loading branch information
filipw authored Aug 18, 2020
2 parents aecec81 + aaa6327 commit 07c6898
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@ Task("CreateMSBuildFolder")
}
}

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

var msbuildSourceFolder = CombinePaths(env.Folders.Tools, "Microsoft.Build.Runtime", "contentFiles", "any", "net472");
DirectoryHelper.Copy(msbuildSourceFolder, msbuildCurrentBinTargetFolder, copySubDirectories: false);

var msbuild15SourceFolder = CombinePaths(msbuildSourceFolder, "Current");
DirectoryHelper.Copy(msbuild15SourceFolder, msbuildCurrentTargetFolder);

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

foreach (var library in msbuildLibraries)
Expand Down Expand Up @@ -457,9 +465,9 @@ Task("CreateMSBuildFolder")
source: CombinePaths(env.Folders.Tools, "Newtonsoft.Json", "lib", "net45", "Newtonsoft.Json.dll"),
destination: CombinePaths(msbuildCurrentBinTargetFolder, "Newtonsoft.Json.dll"));

// Copy content of Microsoft.Net.Compilers
Information("Copying Microsoft.Net.Compilers...");
var compilersSourceFolder = CombinePaths(env.Folders.Tools, "Microsoft.Net.Compilers", "tools");
// Copy content of Microsoft.Net.Compilers.Toolset
Information("Copying Microsoft.Net.Compilers.Toolset...");
var compilersSourceFolder = CombinePaths(env.Folders.Tools, "Microsoft.Net.Compilers.Toolset", "tasks", "net472");
var compilersTargetFolder = CombinePaths(msbuildCurrentBinTargetFolder, "Roslyn");

DirectoryHelper.Copy(compilersSourceFolder, compilersTargetFolder);
Expand Down
2 changes: 1 addition & 1 deletion tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<package id="Microsoft.Build.Runtime" version="16.8.0-preview-20371-01" />
<package id="Microsoft.Build.Tasks.Core" version="16.8.0-preview-20371-01" />
<package id="Microsoft.Build.Utilities.Core" version="16.8.0-preview-20371-01" />
<package id="Microsoft.Net.Compilers" version="3.8.0-1.20373.6" />
<package id="Microsoft.Net.Compilers.Toolset" version="3.8.0-1.20373.6" />
<package id="Microsoft.DotNet.MSBuildSdkResolver" version="5.0.100-preview.8.20362.1" />
<package id="Microsoft.Build.NuGetSdkResolver" version="5.8.0-preview.1.6718" />
<package id="Newtonsoft.Json" version="12.0.2" />
Expand Down

0 comments on commit 07c6898

Please sign in to comment.