MSBuild can be successfully built on Windows, OS X 10.13, Ubuntu 14.04, and Ubuntu 16.04.
build.cmd -msbuildEngine dotnet
Follow Running Unit Tests section of the developer guide chapter for .NET Framework
Install the latest .NET SDK from https://dotnet.microsoft.com/download. That will ensure all prerequisites for our build are met.
- OpenSSL: MSBuild uses the .Net CLI during its build process. The CLI requires a recent OpenSSL library available in
/usr/lib
. This can be downloaded using brew on OS X (brew install openssl
) and apt-get (apt-get install openssl
) on Ubuntu, or building from source. If you use a different package manager and see an error that saysUnable to load DLL 'System.Security.Cryptography.Native'
,dotnet
may be looking in the wrong place for the library.
./build.sh
If you encounter errors, see Something's wrong in my build
./build.sh --test
The best way to get .NET Core MSBuild is by installing the .NET Core SDK, which redistributes us. This will get you the latest released version of MSBuild for .NET Core. After installing it, you can use MSBuild through dotnet build
or by manual invocation of the MSBuild.dll
in the dotnet distribution.
Set the environment variable MSBUILDDEBUGONSTART
to 2
, then attach a debugger to the process manually after it starts.
build.cmd # to have a full build first
.\artifacts\msbuild-build-env.bat
cd test\YOURTEST.Tests # cd to the test folder that contains the test csproj file
dotnet test --filter "FullyQualifiedName~TESTNAME" # run individual test
Use developer command prompt for Visual Studio or put devenv on you PATH
build.cmd # to have a full build first
.\artifacts\msbuild-build-env.bat
devenv MSBuild.sln
Note again that in Visual studio "Use previews of the .NET SDK (requires restart)" must be checked. See the above comment for how to enable this.
See other debugging options here.