-
-
Notifications
You must be signed in to change notification settings - Fork 272
psake 4.7 does not work with Visual Studio 2017 #241
Description
Expected Behavior
Include psake 4.7.0 using nuget in the project. Use Framework "4.6" in psake build script. Psake should automatically detect Visual Studio 2017 and use correct toolset.
Current Behavior
Psake will use Visual Studio 2015 and older toolset which caused the build to fail.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Possible Solution
Psake must contain logic for detecting Visual Studio 2017. This detection must be included in the psake so we don't have to install another PowerShell scripts and modules on machines.
This should work out of the box.
Steps to Reproduce (for bugs)
- Reference psake 4.7.0 using nuget
- Create Visual C++ project using Visual Studio 2017 and target toolset 141.
- Try to build project using psake.
Context
We use psake to build our solutions and projects. We reference a single psake package using nuget and this is a self contained set of scripts which should be able to compile VS2017 based projects.
It's not feasible to install and manage PowerShell modules on each developer and build machines just becasue build scripts cannot properly detect Visual Studio and are not extensible to be self-contained.
Your Environment
- Module version used: 4.7.0
- Operating System and PowerShell version: Windows 10, PowerShell 5