-
Notifications
You must be signed in to change notification settings - Fork 587
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
FAKE doesn't find MSBuild 15.0 (shipped with Visual Studio 2017) #1442
Comments
This was referenced Jan 15, 2017
forki
pushed a commit
that referenced
this issue
Jan 15, 2017
Added MSBuild 15.0 locations to search paths as per @opcon's diagnosis. @opcon's VS community installation was at [1]. I installed VS pro and it ended up at [2]. Am guessing the "Enterprise" path. [1] (ProgramFilesX86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin [2] (ProgramFilesX86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin
This was added. |
Just as Information the Github-Links does not work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The MSBuildHelper module of FAKE does not find the correct executable for the MSBuild.exe shipped with Visual Studio 2017 RC (Community edition).
This is because MSBuild 15.0 (shipped with VS 2017 RC) is installed to
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
, rather then a separate MSBuild folder in Program Files as with earlier versions.Repro steps
Have Visual Studio 2017 RC installed (I have the Community edition, but I imagine it affects others as well).
Use the MSBuildHelper in a FAKE script to build a project, such as e.g.:
Expected behavior
FAKE script builds the project successfully.
Actual behavior
FAKE attempts to use the MSBuild.exe located in
C:\Windows\Microsoft.NET\Framework\v4.0.30128\
, due to the search paths listed here: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/MSBuildHelper.fs#L25which then fails because it uses an old version of MSBuild with C# 5 rather than C# 6
Known workarounds
My current workaround is to see if the Visual Studio 2017 MSBuild directory exists, and if so set the build parameter MSBuild to use that:
The fix would be to add the VS 2017 MSBuild folder to the search paths listed here: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/MSBuildHelper.fs#L25
A separate entry may be needed for every edition of VS 2017 (Community, Professional, Enterprise)
Related information
The text was updated successfully, but these errors were encountered: