I just wanted to write down my solution to an issue we were having at my university with getting .NET 3.5 framework installed.

The Issue

When loading C# scripts from Unity into Visual Studio, we would get “The C# project “xxx” is targeting “.NETFramework, Version=v3.5,Profile=Unity Subset v3.5″, which is not installed on this machine”. So obviously, we just install .NET 3.5 right?

Next Issue

We would then try to install .NET 3.5 and get this issue! I tried the following right afterwards.

  • Uninstall reinstall Visual Studio
  • Uninstall reinstall Unity

The Solution

So the only thing that seemed to work for me is to actually get .NET 3.5 to install… hence I found this on a Microsoft forum:

  1. Delete the key: HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
  2. Open CMD as administrator
  3. net stop wuauserv
  4. net start wuauserv
  5. Download and install this: https://www.microsoft.com/en-gb/download/details.aspx?id=21

And that ended up working! Yay!