Skip to content
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

Build Addon using VS2017 #56

Closed
eiximenis opened this issue Mar 21, 2017 · 2 comments
Closed

Build Addon using VS2017 #56

eiximenis opened this issue Mar 21, 2017 · 2 comments

Comments

@eiximenis
Copy link
Contributor

Just opening this issue for reference and keeping work on that :)

I've tried to build the project using gulp build --x64 with a Windows 10 having only VS2017 installed.
In the VS2017 installer the C++ workload ("Desktop Development with C++") was installed with both C++ toolsets: 141 (VS2017) and 140 (VS2015).

Using gulp build --x64 failed due to not founding msbuild. This can be solved by editing gulpfile.js and forcing toolsVersion to 15 in the msbuild call.
But node-gyp complains about compiling the addin node later.

Tried several things with no luck.

Finally I installed "Visual C++ Tools for VS2015" (http://landinghub.visualstudio.com/visual-cpp-build-tools) and reverting the toolsVersion to 14 in the gulpfile.js.
Some errors happening complaining about the file Microsoft.Cpp.Defaults.props. Finally need to set these two environment variables:

set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
set GYP_MSVS_VERSION=2015

This allowed the compilation of the project using Visual C++ 2015 Tools installed.

Real problem is node-gyp (gulp-msbuild works OK with VS2017): i could not make it work with having only VS2017 installed (even though i installed the 14.0 toolset).

I'll do some tests in the future and I'll update the status of this issue. :)
If anyone has any comment about building the project with VS2017 would be very appreciated.

@eiximenis
Copy link
Contributor Author

Hi.

I was able to build with VS2017 by doing two things:

  1. Installing the VS2015 cpp tools (http://landinghub.visualstudio.com/visual-cpp-build-tools)
  2. Then setting some environment variables:
set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
set GYP_MSVS_VERSION=2015

This is the best way I found :)

@molant
Copy link
Contributor

molant commented Nov 16, 2017

Fixed via 41cb47c

@molant molant closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants