Runtime: Building on Windows with VS 2017

Created on 8 Mar 2017  路  5Comments  路  Source: dotnet/runtime

Hey guys,

Just wanted to know what the requirements are for Building CoreFX on Windows with VS 2017, and maybe suggest an update to the docs here https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md.

From a quick test, it seems that I need the Desktop development with C++ workload, but also the VC++ 2015.3 v140 toolset (x86,x64) component.

I tried installing only these individual packages but CMake wouldn't find the compiler (No CMAKE_CXX_COMPILER could be found):

  • Visual Studio C++ core features
  • VC++ 2015.3 v140 toolset (x86,x64)
  • VC++ 2017 v141 toolset (x86,x64)

Regarding the DIA SDK, it seems the Desktop development with C++ workload installs it in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK and build.cmd finds it without any problem.

Thanks!

area-Infrastructure-libraries documentation

Most helpful comment

The docs could definitely be updated.

I haven't attempted to find the minimum set of components required, but I believe it should work if you have the following workloads

  • .NET Core Cross-Platform Development
  • Desktop Development with C++

    • VC++ 2015.3 v140 Toolset (x86x64) -- This might not be required

  • .NET Desktop Development -- This might not be required

In any case, VS2017 only works if you run the build script from the Developer Command Prompt.

I will send out a PR later tonight that updates the docs. I will also determine what the minimal install required is.

All 5 comments

I would have expected https://github.com/dotnet/corefx/pull/16710 to fix these issues.

cc @tannergooding

The docs could definitely be updated.

I haven't attempted to find the minimum set of components required, but I believe it should work if you have the following workloads

  • .NET Core Cross-Platform Development
  • Desktop Development with C++

    • VC++ 2015.3 v140 Toolset (x86x64) -- This might not be required

  • .NET Desktop Development -- This might not be required

In any case, VS2017 only works if you run the build script from the Developer Command Prompt.

I will send out a PR later tonight that updates the docs. I will also determine what the minimal install required is.

Feel free to make me a reviewer. I'll test the minimal install in my computer.

Ok, so for the Workloads install, looks like the following is minimal:

  • .NET Desktop Development

    • All Required Components

    • .NET Framework 4-4.6 Development Tools

  • Desktop Development with C++

    • All Required Components

    • VC++ 2017 v141 Toolset (x86, x64)

    • Windows 8.1 SDK and UCRT SDK

    • VC++ 2015.3 v140 Toolset (x86, x64)

For Individual Components Install, looks like the following is minimal:

  • C# and Visual Basic Roslyn Compilers
  • Static Analysis Tools
  • .NET Portable Library Targeting Pack
  • Windows 10 SDK or Windows 8.1 SDK
  • Visual Studio C++ Core Features
  • VC++ 2017 v141 Toolset (x86, x64)
  • MSBuild
  • .NET Framework 4.6 Targeting Pack
  • Windows Universal CRT SDK
  • VC++ 2015.3 v140 Toolset (x86, x64)

The build instructions for CoreCLR were already partially updated, but it requires a workaround which I didn't document and one or more components not listed above (still trying to determine which component that is).

I will send a PR for both CoreFX and CoreCLR to list the minimum dependencies here after I finish validating the CoreCLR requirements.

Actually, looks like CoreCLR isn't working at all anymore (WRT building on VS2017), due to the recent build tools upgrade: https://github.com/dotnet/coreclr/commit/8f23fca0ff57c97707d4f6b5068e8044d2dcc13c

I'll send the PR out for CoreFX and will continue investigating the CoreCLR issue separately

Was this page helpful?
0 / 5 - 0 ratings