Share
 
 

.NET Framework Installation Location

If you install the 64-bit version of Visual Studio to a custom location, the .NET Framework may be installed at a location other than that to which the FrameworkSDKDir environment variable points. This prevents the compiler from finding the .NET SDK. Typically in this situation, the .NET framework will have been installed to the C:\Program Files\Microsoft .NET\SDK directory, while the FrameworkSDKDir variable points to a directory under the compiler location.

You can fix this problem in either of the following two ways:

  • Edit the vcvarsamd64.bat file, setting the FrameworkSDKDir variable to point to the actual location of the .NET Framework.
  • Uninstall the .NET SDK using Add or Remove Programs in the Windows Control Panel, and then reinstall it manually. Note that the .NET SDK has its own entry in Add or Remove Programs dialog box. To reinstall manually, run \vs\wcu\SDK\x64\setup.exe from the Visual Studio media, choosing your Visual Studio root folder as the install location.

Was this information helpful?