Downgrade Visual Studio 2019 back to Visual Studio 2017 - 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.!

Related

Where is "Retarget Solution" in Visual Studio 2022

I use Visual studio build one USB SDK, I got this message:
Error MSB8020 The build tools for WindowsKernelModeDriver10.0 (Platform Toolset = 'WindowsKernelModeDriver10.0') cannot be found. To build using the WindowsKernelModeDriver10.0 build tools, please install WindowsKernelModeDriver10.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". usbsamp (Sys\Driver\usbsamp) C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets
I try following this, use "Retarget Solution", but I can't find it in Project menu, is it for early visual studio? How I can fix it in Visual Studio 2022?
Visual Studio use different method set this, after I use Project->property->general->Platform toolset change to Visual Studio 2022, the error is fixed.

Visual Studio Project 2019 project still require msvcr120d.dll

I migrate Visual Studio 2013 project to visual studio 2019 and recompiler my all dlls and other files using visual studio 2019. But when I run my application, it still requires msvcr120d.dll in release mode.
Anyone help me out to fix this.
Go to settings and select proper Platform Toolset
for vs2019 select v142

Visual Studio 2017 platform toolset issue

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.`

Compiling using MSBuild 12.0 from Microsoft Visual Studio 2015

I have a solution that was compiled with MSVC 12.0 Visual Studio 2013 (C++/CLI and C#) but only have Visual Studio 2015 (Community). I want to build the project using MSVC 12.0 as it was intended, as I only need to rebuild 1 part of the solution (of 5) for my purpose and want it to be compatible with the other DLLs. When trying to build it from MSVC 14.0 (Visual Studio 2015) it says:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found.
Of course I installed the MS Build tools for 2013 (MSVC 12.0, v120) from here: https://www.microsoft.com/en-us/download/details.aspx?id=40760 as well as the Microsoft Visual C++ Redistributable 2013 package.
And the right directory for the 12.0 build tools install is C:\Program Files (x86)\MSBuild\12.0\Bin\amd64
It looks like a configuration error on the solution (or in Visual Studio in general) since it is looking for the build tools in the wrong directory. Does anyone know what settings I need to change / add in Visual Studio to get it to compile with MSBuild 12.0 instead of 14.0? I'd prefer not to install Visual Studio 2013 since I don't use it for anything else (just want to have the option to use VS 2013 MSBUILD within VS 2015 as needed).
Okay I have gotten this working although in a roundabout way. Thanks others that have answered and commented. Sign up for a Microsoft Visual Studio Dev Essentials subscription for free. https://azure.microsoft.com/en-us/pricing/member-offers/vs-dev-essentials/ Then you can go through the menus and download Visual Studio Community 2013 by going to this link and finding it https://my.visualstudio.com/downloads. After doing so, you can build MSVC 12.0 from Visual Studio 2015. Sure, not perfect, but it works. I haven't tried uninstalling Visual Studio 2013 to see if it still works (Windows Phone SDK 8.1 is installed with 2013 as was mentioned to get it working in the Enterprise version of 2015) but if you could somehow keep that and remove the 2013 edition I believe it could work without 2013 installed...
If you go to the top of your .vcxproj change it to this
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Then your .sln can still open in Visual Studio 2015
VisualStudioVersion = 14.0.25420.1
The reason is because the compiler version is specified on a project-by-project basis, and will override the solution version.
I'd prefer not to install Visual Studio 2013 since I don't use it for anything else (just want to have the option to use VS 2013 MSBUILD within VS 2015 as needed).
You can install VS2013 toolset version from your VS2015 installer without installing visual studio 2013. From the 2015 installer, select Windows 8.1 and Windows Phone 8.0/8.1 Tools and common Tools for Visual C++ 2015:
After installation completed, you will find the platform Toolset below:
Then you can built your project with platform toolset Visual Studio 2013(v120).
You can refer to more info from the similar question on SO.

Share project between Visual Studio 2013 and Visual Studio 2012

I am using Visual Studio 2013 community and created C++ project.
I want to share the project with a colleague working with Visual Studio 2012 professional.
Once he took the project he had to change the toolset to v110 and it worked just fine for him.
When he shared it back with me I got the message:
error MSB8020: The build tools for Visual Studio 2012 (Platform Toolset = 'v110') cannot be found.
To build using the v110 build tools, please install Visual Studio 2012 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 "Upgrade Solution...".
I do not want to upgrade the solution, as that will cause us each time to change the project, but I couldn't find anywhere to download the VS2012 build tools.
Where can I find Visual Studio 2012 build tools?
You can have both Visual Studio 2012 and Visual Studio 2013 installed on the same machine. Once you have both installed you can use the Visual Studio 2012 compiler in Visual Studio 2013.
So I suggest you install Visual Studio 2012. I think Express edition should be enough.
Alternatively, your colleague can install Visual Studio 2013 Community Edition alongside his existing Visual Studio 2012 Professional Edition. I think the features are roughly equivalent the only question is if they are breaking the license terms.