-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC: VS2019 is not recognized #367
Comments
To add more to @zosrothko statement of the issue. VS 2019 does not set and "SOFTWARE\Microsoft\VisualStudio\SxS\VS7" registry keys nor does it set any "VS###COMNTOOLS" environment variables. The recommended approach from Microsoft is to use the Thus it should be simple to add a check for the tools existence and then perform its execution to locate the installations. Example: Produces This json could be parsed for the list of installed VS version since 2010. see properties: InstallationPath, InstallationVersion |
I just tried this with 3.10.1 and locally built 3.10.2-SNAPSHOT, neither work with or without a passed in proper path to the tools ie. Always failing on validate [ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.10.2-SNAPSHOT:nar-validate (default-nar-validate) on project foo: Execution default-nar-validate of goal com.github.maven-nar:nar-maven-plugin:3.10.2-SNAPSHOT:nar-validate failed: The system cannot find the file specified. |
I've got a working fix for this in my fork; I fixed it by using the environmental variables since VS no longer makes the previously used registry entries. https://github.com/mondain/nar-maven-plugin |
@mondain could you get your fix to working with the latest released nar in maven? IE the "mvn clean package -P win -Dmsvc.toolpath="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64" ? |
UPDATE: seems this changes something however it gives me a nullpointer.. Caused by: java.lang.NullPointerException Im probably missing some property |
Okay made a spelling mistake, linker name should be msvc.. this gives: DEBUG] -- end configuration -- Which obviously are wrong, since version should be 16.. Looks like something are different in the current master branch of the nar plugin, maybe it has been fixed there? |
Okay so I just tried to use version 3.10.2-SNAPSHOT built from master and it seems to be working (I get an error but it looks to be from the actually cpp code) I wonder when are 3.10.2-SNAPSHOT scheduled to be released |
@ctrueden do you have time to push the snapshot? |
@nmwael @GregDomjan I've also had issues on newer Windows 10 systems if I've installed the VS 2019 build tools on top of VS 2019 itself; the paths get messed up etc, I've been able to resolve that by removing the build tools; not sure why MS even supports having both when one or the other isnt needed. |
@mondain haven't really had time to look into such a configuration of the system with the IDE and Build tools, think there is a similar assumption that you can only have either enterprise or professional and not both. |
@GregDomjan @ctrueden did the plugin updates get pushed somewhere? Switching my pom when I have to build on windows systems still requires me to build the plugin itself to proceed; which is of course a PITA going on ~4 months now... |
@mondain Sorry no progress from my side, will look into it some more soon I hope |
Hi
The latest VS2019 version of MSVC is not recognized by maven-nar-plugin because the Register Key is not updated anymore by MSVC installation starting from VS2019. See there. Thus nar-maven-plugin should use now the
vswhere.exe
to locate MSVC tools as linker & compiler.The text was updated successfully, but these errors were encountered: