Visual Studio 2017 platform toolset issue - visual-studio-2017

just wondering if anyone might be able to help with an issue I'm having with Visual Studio 2017. I originally had Visual Studio 2012 Ultimate installed with a valid key. Just recently I decided to just use Visual Studio 2017 Community because I'm not really using any of the features in Ultimate. After installing VS2017 Community, I uninstalled VS2012. Now, whenever I create a new project I get the error:
The "ConfigurationGeneral" rule is missing the "WindowsTargetPlayformVersion" property.
So I have to click "OK" then edit the properties of my project to use "VS 2012 (v110)" for the Platform Toolset to get anything to compile. It tells me v141 is not installed. Also my IntelliSense doesn't seem to be working at all.
If I check the VS Installer, it says I have both v140 and v141 installed, so I'm thinking it might be a path issue? I've been Googling but nothing has helped. Any help with this and IntelliSense would be appreciated, thanks.
Installed Components:
VC++ 2015.3 v14.00 (v140) toolset for desktop
VC++ 2017 version 15.9 v14.16 latest v141 tools
I tried doing a repair, but that didn't help.
This is what IntelliSense says:
`error : Designtime build failed for project '..\MyProject.vcxproj' configuration 'Debug|Win32'. IntelliSense might be unavailable.
Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.`

Related

Downgrade Visual Studio 2019 back to Visual Studio 2017

There is a lot of answers related to upgrading a solution from Visual Studio 2017 to Visual Studio 2019 on StackOverflow. But how do I downgrade back to Visual Studio 2017? When I try to build a project in Visual Studio 2017 I get the following error:
Error MSB8020.
The build tools for v142 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install v142 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".
Before that, I used Visual Studio 2019 with the solution and it worked fine. But now I have to use Visual Studio 2017 instead and as expected I have errors. Is there a way to fix it not recreating the solution manually? Thanks for advice!
This problem is with your MSBuilder, re check the version of MSBulder in Visual Studion sometime it may be still support for vs2019.
or
You can changed this in your project
to: Project->Properties->General->Platform Tool_set and change to the current version of your VS.
Think this will be helpful.!

How can I set up Visual Studio 2017 to develop drivers?

According to this forum, https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware-winpc/windows-wdk-on-visual-studio-2017-community/fdbd2b44-e57a-4849-903d-04001205a764
Windows Driver Kit is not currently supported by visual studio 2017.
I tried installing the Windows Driver Kit, but the test driver projects, such as this one, fail to build
https://github.com/Microsoft/Windows-driver-samples/tree/master/serial/VirtualSerial
I get this error when building:
Error MSB8020 The build tools for WindowsUserModeDriver10.0 (Platform Toolset = 'WindowsUserModeDriver10.0') cannot be found. To build using the WindowsUserModeDriver10.0 build tools, please install WindowsUserModeDriver10.0 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".
I already tried retargeting the Solution to the two options I have: 10.0.17134.0 and 8.1, but the same error keeps coming up.
What do I need to do to build this sample driver? Do I need to install VS2015? VS2017 community edition? Why isn't this WDK supported by the Visual Studio 2017 professional version?
Thanks,
Visual Studio 2017 definitely supports kernel-mode device driver development; there's no doubt about that because I've been using VS17 for it for many, many months.
Use the latest version of Windows Driver Kit (WDK) which can be downloaded and installed from MSDN: https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
Furthermore, you can always use the Enterprise WDK and then you can simply build using that if you wanted to from command-line. (Also can be found on page linked-to above)
Download the correct WDK installer for your edition of Visual Studio 2017:
WDK for Windows 10, version 1809 for Visual Studio Community 2017
WDK for Windows 10, version 1803 for Visual Studio Professional 2017
WDK for Windows 10, version 1709 for Visual Studio Enterprise 2017
Visit https://learn.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads for more information.
Not exactly a solution, but Windows 8.1 WDK works with Visual Studio 2017 Enterprise,
Download it from here, just need to retarget the project to 8.1
https://www.microsoft.com/en-us/download/confirmation.aspx?id=42273
In addition, I needed to get VS2015 C++ Build Tool to fix a missing Microsoft.cpp.props error
http://download.microsoft.com/download/5/F/7/5F7ACAEB-8363-451F-9425-68A90F98B238/visualcppbuildtools_full.exe
Developing drivers to windows is quite interesting one will be exposed to advanced Operating System Concepts.The set up for the environment will be IDE
IDE - Visual Studio (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)
Compilers (WDK)
Debugger (WDK)
WDK contains both(https://go.microsoft.com/fwlink/?linkid=2085767). Latest Visual Studio(VS2019) will come along with the latest WDK(10, 1903 as of now).
Sometimes plugins might not work properly i.e integration issues between Visual Studio and WDk.
By going to the location "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019" and run VSIX installer.
Now in a new project, driver related templates are available.

Visual Studio - "Unknown Compiler version" after upgrading

I have a Visual Studio 2015 C++ project which I wanted to upgrade to VS 2017. I had already denied the automatic prompts to upgrade my project when I first opened my project in VS 2017 (wasn't sure I wanted to upgrade at the time) so I couldn't update my project that way. Instead, I just went to my project's:
Properties->Configuration Properties->General
And in there I updated the 'Platform Toolset' option to 'Visual Studio 2017 (v141)' and also changed the 'Window SDK Version' to 10.0.16299.0 from windows 8.1. After performing this manual upgrade I now get the warning when building:
Unknown compiler version - please run the configure tests and report the results
Why am I getting this warning? I thought by changing the 'Platform Toolset' to VS2017 I would be using the VC2017 compiler. How do I fix this warning?
This line is from boost/config/compiler/visualc.hpp so the solution would be to upgrade to the boost 1.65.1 which properly acknowledges new version of Visual C++ compiler.

Visual Studio Platform 2015 Toolset ='v141' cannot be found

I'm trying to compile a project using OpenFrameworks (a library which uses C++) in Visual Studio. The build is set to Release and X64 and in the project properties I have set the Platform Toolset to Visual Studio 2015 (v140)
However every time I try to build the project I get the same error (amongst others)
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.
I know v141 is from the new version of MSVS 2017 but I do not want to upgrade to as the new version is not compatible with OpenFrameworks. I have tried rebuilding the project from scratch several times and have also looked into the VCXPROJ file and verified that everything is set to V140 - and it is. All very bizarre.
It seems that on build, something is setting a requirement for v141 but I cannot seem to find where this is coming from. Does anyone have an idea?
I had such an issue. The solution is: open menu "Project"->Properties->Configuration Properites->General - and choose platform toolset v140.
Had this same error trying to npm install after cloning a node based project. It had an npm dependency that required C++ source to be compiled.
I had already modified my VS2017 install to include Individual Components -> VC++ 2017 version 15.7 v14.14 latest v141 tools
but that didn't help.
I applied these commands in succession
npm install -g node-gyp
npm install --global --production windows-build-tools
The first had no effect but the second did the trick and the npm install command completed successfully after that.
This was addressed in the comments of one of the answers, but it worked for me. I had both v140 and v141 build tools installed, so when I had to use v140 build tools for something, I set the VCTargetsPath variable to the path of the v140 build tools. Deleting this variable in my environment variables ultimately fixed this issue for me.
For this error, and similar, for other platforms (e.g. VS2013) this problem typically occurs because you installed an older version of VS after you installed a later one. It's my observation that this will effect all of your Visual Studio C++ projects, and you will have to manually set them to target the specific toolset for the given version of VS you are trying to build the project under.
If anyone has the same issue..
Reason: When someone tries to open existing solution which created/build on latest VS version (VS2015 / 2017) and tried to open with backward / old version of VS instance. Then this error might occur.
Please try below steps.
Right click Project->Properties->Configuration Properties.
Set 'Target Platform Version' as Supported OS version, i.e. for 8.1 > Win7 & 10 Win10
Set 'Platform tool set' as installed visual studio version.
Re-Build & Enjoy :)
I had that v141 error when building from command-line but not inside visual studio:
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".
Turns out it was because I was calling the wrong vcvars so I was using the wrong version of msbuild.exe:
:: wrong (Visual Studio 2015)
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 >NUL
:: correct (Visual Studio 2017)
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat" x64 >NUL
Not sure it's possible for this to be the error inside visual studio, but I hope this is helpful to some future searcher...

Visual Studio 2013 cannot convert VS 2012 C++ Projects

All my C++ Visual Studio 2012 projects cannot be upgraded by VS 2013 Professional Update 2, microsoft tells that you also need to have VS2012 installed in order to open VS 2012 projects.
The problem is that I have installed VS2012 and still get the same error.
after each project name in VS 2013 I have (Project incompatible), I want to convert the projects to VS2013 because I don't want to use VS2012 anymore.
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
No changes required
These projects can be opened in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
and this is the error in migration report
The application which this project type is based on was not found.
I found somewhere on a forum that if you install VS 2012 SDK it should work, but the VS2012 SDK cannot be installed because it cannot find Visual Studio 2012