1

The problem: Visual Studio Professional 2013 does not seem to recognize that .Net 4, or 4.5 through 4.7 are installed on my computer. It does not show ANY of these in the 'target framework' drop-downs. And my previous C# project that was made for 4.5 no longer loads or compiles (it used to work, on the same machine).

It looks like this: Target drop-down

I've wasted over five days on this problem. I searched the internet and this site numerous times already and read carefully every single page that even remotely has to do with this problem. I tried literally dozens of things, some of them several times in a different order, and NOTHING helps:

  • Re-installing .NET, all versions I could find 4.5- 4.7 (yes the SDK versions as well as multi-target versions).

  • Uninstalling all .NET installations, using the .NET cleanup tool, using the .NET repair tool, manually going over every .NET folder and registry key I could find and deleting those, and then reinstalling .NET 4.5 SDK.

  • Reinstalling and repairing Visual Studio 2013, or manually deleting all Visual Studio files and folders everywhere on the drive, and then re-installing it.

  • Installing various Windows SDKs separately, and installing MSBuild 2015.

  • When I install the same VS2013 install on another fresh VM machine, it works fine. I tried comparing both machines for days and even copying whole .Net/SDK/MSBuild folders and registry branches from the good VM to my machine, but could not find what was missing or misconfigured.

  • I tried debugging it using ProcessMonitor and other tools/logic carefully for 2 days but could find anything that helped (there are many thousands of lines that have to do with .NET so this is an impossible task.)

  • I tried using "SET TRACEDESIGNTIME=true" and looking at the logs. But I could not figure out which of the many settings are important or missing. I did notice that "SDK40ToolsPath" was empty and I fixed that by setting these values in the command line which were also mis-configured:

    SET MSBuildExtensionsPath=C:\Program Files (x86)\MSBuild SET MSBuildExtensionsPath32=C:\Program Files (x86)\MSBuild

And this seemed to do the trick for the path value, but still no .NET 4+ in VS. Perhaps there are other more basic properties I should be worrying about if SDK40ToolsPath wasn't set properly?

I am at my wits end and I hope that I do not have to reinstall Windows just for this because that would take another week. If anyone has any insight how VS detects .NET framework versions, or how to solve this problem, I would be most grateful.

Zev
  • 11
  • 1
  • Have you tried installing [targeting packs](https://stackoverflow.com/q/31836046/11683)? – GSerg Jan 01 '19 at 18:40
  • Yes I wrote above multi-target packs, plus I reinstalled Visual Studio itself several times which includes those packs as part of its install. – Zev Jan 01 '19 at 19:42
  • P.S. I forgot to mention I also installed Visual Studio Update 5 a couple of times – Zev Jan 01 '19 at 19:43
  • Is there a reason you are still using 2013 and have not updated to a more recent edition? If you are using the free edition of 2013 there is a free edition of 2017 called the "Community" edition. – Scott Chamberlain Jan 01 '19 at 20:14
  • Yes, because I need the Professional version and do not wish to purchase an upgrade at this time. – Zev Jan 01 '19 at 20:18
  • Well now that you mentioned it, I looked up the edition differences between pro and comm and it seems they aren't as important as they used to be back then when I bought it. I may try the 2017 community ed tomorrow if nobody else has a better idea, but I have big doubts it will help. – Zev Jan 01 '19 at 20:37
  • Ok I installed vs 2017 Community (after uninstalling everything else yet again). It didn't change a thing. Max Net framework that appears is still 3.5. I even selected .Net 4.5, and 4.7 when installing it. – Zev Jan 01 '19 at 23:57

0 Answers0