Skip to content

jaredpar/xcopy-msbuild

Repository files navigation

XCopy MSbuild

This repo is designed to compose together existing NuGet package assets to create a functional version of MSBuild which can be distributed via xcopy / nuget.

Build MSBuild

To build the xcopy msbuild you need to have a minimal Build Tools 2019 installation on your machine. When creating this installation make sure to check only the following options:

  • .Net Desktop Build Tools
  • .Net Core 2.1 development tools (right column)
  • .Net Framework 4 - 4.6 development tools

Then to build the xcopy NuPkg run the following command:

.\build-msbuild.ps1 -buildToolsDir "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"

That will put the MSBuild output into binaries\msbuild.

Build Reference Assemblies

In order to build most .NET projects MSBuild will need the .NET Reference assemblies. These are a separate component from MSBuild and hence this repo produces a separate package for them. To produce this packaeg run the following command.

.\build-reference-assemblies.ps1

Note that MSBuild needs to be told of their location via TargetFrameworkRootPath. This can be specified on the command line or via an environment variable:

msbuild /p:TargetFrameworkRootPath=path\to\refassemblynuget

Controlling package name and version

Both of the build scripts accept the following arguments to control the name and version of the package:

  • packageName: Name of the package
  • packageVersion: Version of the package

About

Building an xcopy version of MSBuild

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published