Newbie How-To: Error MSB8020 Platform Toolset cannot be found: Retargeting Examples for Visual Studio 2015


#1

This may be my lack of formal knowledge about the VS 2015 environment but I was unable to get many of the non-2015 examples for Visual Studio to compile no matter what I did with the settings, property pages, etc. After a ton of investigation and brute-force I can only assume that 2015 doesn’t really do a great job at re-targeting, or I just can’t find the right combination of settings in the IDE to re-target properly. Following is the example of the issue newbies may encounter and my brute-force method to quickly move an example to 2015. After I figured out this process I was able to move all examples to 2015 within about 10 minutes. This post assumes you have no previous VS environments and are starting with a clean-slate of VS 2015 on your machine.

Problem: If you attempt to open a 2013 or previous solution in 2015 you are met with a dialog stating that the solution needs to be upgraded. If you agree to the upgrade then attempt to compile the project you will likely get the MSB8020 error. The solution upgrade was supposed to re-point your build options to v140 of VS and when you look at all of the visible settings it shows this was accomplished… but that same error just keeps smacking you on builds. Searching the web you’ll be met with a host of potential solutions from pre-build command line options to property page tweaks.

It appears however that any references within the actual 2013 project file itself do not get upgraded and override the property page settings. Note the version the project is set for from the errors list (likely v120 for 2013, v110 for 2010, etc)

20xx to 2015 Brute-Force upgrade

  1. Open Visual Studio 2015
  2. Select File->Open Project and navigate to the \examples\audio plug in host\builds folder
  3. Right mouse click the VisualStudio20xx folder to upgrade and select Copy then right mouse again and select Paste
  4. Right mouse click the VisualStudio20xx - Copy folder and rename followed by changing the name to VisualStudio2015
  5. Double click the folder and select the solution (sln) file.
  6. You will be prompted to upgrade the solution/project. Go ahead and accept that option. This will upgrade your user property pages (you can learn more about that as you move forward with VC)
  7. File-Save the solution then File-Close solution
  8. External to VS open the vcx.proj file from the 2015 folder in a suitable text editor
  9. Search and Replace all instances of v120 with v140 (there are usually 2-4 entries) then save the file
  10. Now reopen the 2015 solution in VS and you’re ready to go.

Again, this is only a proven brute-force method I came up with due to my frustration with the IDE not complying with all the fixes I found on the web. Hope it helps other newbies get a jump start.


#2

Maybe I’m not understanding your post correctly, but could you not simply create another VS 2015 export target in the Projucer? For this, open the jucer file with the latest Projucer version and click on the button “Create New Exporter…”. Then select “Visual Studio 2015” from the popup menu.


#3

In my defense… newbie. :slight_smile: The Projucer solution works right out of the box (of course.) I think I just went right into trying to open sln files and was so fixated on the IDE issues that I didn’t go all the way back to the source. This also shed light on my previous post about the .sln file being launched into the wrong VS IDE as when I chose to save and launch into an IDE I was provided a list of 2010/13/15 which did not appear before.

Live and learn. If anything I got a first hand deeper view of project files, property pages, etc that I’m sure will help me more as I plug along.

Thanks so much for pointing this out!


#4

Hey no problem. That’s how we all learn. And now I know who to ask if I have troubles with project files and/or property pages :-D.


#5

Drat! With all my years of experience you’d think I’d learn to not tell people what I do know! :wink: