Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Support building with VS2019 Preview #22525

Merged
merged 4 commits into from
Feb 12, 2019
Merged

Support building with VS2019 Preview #22525

merged 4 commits into from
Feb 12, 2019

Conversation

tannergooding
Copy link
Member

@@ -13,6 +13,7 @@ You must install several components to build the CoreCLR and CoreFX repos. These
Visual Studio must be installed. Supported versions:
- [Visual Studio 2015](https://www.visualstudio.com/vs/older-downloads/) (Community, Professional, Enterprise). The community version is completely free.
- [Visual Studio 2017](https://www.visualstudio.com/downloads/) (Community, Professional, Enterprise). The community version is completely free.
- [Visual Studio 2019 Preview](https://visualstudio.microsoft.com/vs/preview/) (Community, Professional, Enterprise). The community version is completely free.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact workloads required should probably be figured out. It might be worth updating the VS2017 entries as well (as it specifies more than actually required in the latest release).

@tannergooding
Copy link
Member Author

CC. @jashook, @safern

@tannergooding
Copy link
Member Author

Worth noting the following warnings:

CMake Deprecation Warning at src/Interop/PInvoke/DllImportPath/CMakeLists.txt:11 (cmake_policy):
  The OLD behavior for policy CMP0037 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Configuring done
CMake Warning in src/Interop/IJW/ManagedCallingNative/IjwNativeDll/CMakeLists.txt:
  For the target "IjwNativeDll" the /clr compiler flag was added manually.
  Set usage of C++/CLI by setting COMMON_LANGUAGE_RUNTIME target property.


CMake Warning in src/Interop/IJW/NativeCallingManaged/IjwNativeCallingManagedDll/CMakeLists.txt:
  For the target "IjwNativeCallingManagedDll" the /clr compiler flag was
  added manually.  Set usage of C++/CLI by setting COMMON_LANGUAGE_RUNTIME
  target property.

Copy link

@jashook jashook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks for the change!

@tannergooding
Copy link
Member Author

Seems there is also an error when compiling the tests:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(423,5): error MSB6006: "CL.exe" exited with code -1073740940. [E:\Users\tagoo\Repos\coreclr\bin\tests\obj\Windows_NT.x64.Debug\Native\src\baseservices\exceptions\regressions\Dev11\147911\fpcw.vcxproj]

All other tests compile successfully.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tannergooding
Copy link
Member Author

@jashook, what would you recommend to deal with the singular test project that fails to compile under VS 2019 (see #22525 (comment))?

@tannergooding
Copy link
Member Author

It might be worth noting that, refactoring the code file (so that each __try/__except block is in its own method) allows the test to compile. This also makes the test more readable given that there are three different "scenarios" being covered by it.

@jashook
Copy link

jashook commented Feb 11, 2019

Seems like changing it to allow it to compile seems correct to me. /cc @RussKeldorph opinion?

@tannergooding
Copy link
Member Author

I imagine we will want to log a bug with the VC++ team as well.

build-test.cmd Outdated Show resolved Hide resolved
@tannergooding
Copy link
Member Author

Added a commit removing the VS2015 support, as per the comment from @jkotas here: #22525 (comment)

I think everything (modulo the VC++ bug, which I am logging now) should be addressed now and this should be ready to merge after the tests complete.

@tannergooding
Copy link
Member Author

tannergooding commented Feb 12, 2019

DevDiv#789922 was logged to track the C++ compiler issue that showed up for regressions\Dev11\147911\fpcw

* Ensure you have installed at least [Visual Studio 2015 Update 3](https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs).
* Make sure that you install "VC++ Tools". By default, they will not be installed.
* To build for Arm32, Make sure that you have the Windows SDK for Windows 10 installed (or selected to be installed as part of VS installation). To explicitly install Windows SDK, download it from here: [Windows SDK for Windows 10](https://developer.microsoft.com/en-us/windows/downloads)
- [Visual Studio 2019 Preview](https://visualstudio.microsoft.com/vs/preview/) (Community, Professional, Enterprise). The community version is completely free.
Copy link

@TylerBrinkley TylerBrinkley Mar 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should have been noted that the CMake version needs to be 3.14-rc for VS 2019.

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Support building with VS2019 Preview

* Fixing gen-buildsys-win to only set the architecture for the VS generator

* Refactoring Dev11/147911/fpcw.cpp so that it compiles under VS2019

* Removing the remaining traces of VS2015 build support


Commit migrated from dotnet/coreclr@f077060
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants