nugetvisual-studio-2017roslynsystem-codedom-compiler

Visual Studio 2017 WebSite Menu "Enable C# 6 / VB 14" fails to load Nuget Package


Since a while whenever I click on the WebSite menu "Enable C# 6 / VB 14" I get an exception message saying that "Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2" is not found in following primary resource(s): "C:\Program Files (x86)\Microsoft Web Tools\Packages"

I check the folder and see that it is upgraded to version 1.0.3. (C:\Program Files (x86)\Microsoft Web Tools\Packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3)

How can I bring the menu again intact in order to point to the correct version?


Solution

  • How can I bring the menu again intact in order to point to the correct version?

    If you want to bring the menu again, you should uninstall the the package "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" from your website project.

    enter image description here

    Then point to the correct version.

    Besides, if you want to resolve the error "Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2" is not found ...", you can download that package from nuget.org with version 1.0.2. Then set it to the folder C:\Program Files (x86)\Microsoft Web Tools\Packages\. In this case, you will never get that error when you enable "Enable C# 6 / VB 14".