Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.95 KB

windows-instructions.md

File metadata and controls

55 lines (35 loc) · 2.95 KB

Building CoreFX on Windows

You can build .NET Core either via the command line or by using Visual Studio.

Required Software

Visual Studio 2015 is required.

The following free downloads are compatible:

Note: In order to build our C++ projects be sure to select "Programming Languages | Visual C++ | Common Tools for Visual C++ 2015" while installing VS 2015 (or modify your install to include it).

We also require that Visual Studio 2015 Update 1 be installed.

CMake is required to build the native libraries for Windows. To build these libraries cmake must be installed from the CMake download page and added to your path.

Building From the Command Line

Open a Visual Studio Command Prompt. From the root of the repository, type build.cmd. This will build everything and run the core tests for the project.

Visual Studio Solution (.sln) files exist for related groups of libraries. These can be loaded to build, debug and test inside the Visual Studio IDE.

Note that when calling the script build.cmd attempts to build both the native and managed code. Only use it when the parameters that you are passing to the script apply for both components. Otherwise, use the scripts build-native.cmd and build-managed.cmd respectively.

For more information about the different options when building, run build.cmd -? and look at examples in the developer-guide.

Running tests from Visual Studio

  1. Open solution of interest
  2. Right click test project and select 'Set as startup project'
  3. Ctrl+F5 (Run)

Debugging tests in Visual Studio

  1. Install VS 2015 Preview or later including Web Developer Tools
  2. Open solution of interest in VS 2015
  3. Right click test project and select 'Set as startup project'
  4. Set breakpoint appropriately
  5. F5 (Debug)

For advanced debugging using WinDBG see Debugging CoreFX on Windows

Notes

  • Running tests from using the VS test explorer does not currently work after we switched to running on CoreCLR. We will be working on enabling full VS test integration but we don't have an ETA yet. In the meantime, use the steps above to launch/debug the tests using the console runner.

  • VS 2015 is required to debug tests running on CoreCLR as the CoreCLR debug engine is a VS 2015 component.

  • If the Xamarin PCL profiles are installed, the build will fail due to issue #449. A possible workaround is listed in the issue itself.