Visual Studio 2017 网站菜单“启用 C# 6/VB 14"无法加载 Nuget 包 [英] Visual Studio 2017 WebSite Menu "Enable C# 6 / VB 14" fails to load Nuget Package

查看:95
本文介绍了Visual Studio 2017 网站菜单“启用 C# 6/VB 14"无法加载 Nuget 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,每当我单击网站菜单启用 C# 6/VB 14"时,我都会收到一条异常消息,指出在以下主要资源中找不到Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2"): "C:\Program Files (x86)\Microsoft Web Tools\Packages"

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"

我检查了文件夹,发现它已升级到 1.0.3 版.(C:\Program Files (x86)\Microsoft Web Tools\Packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3)

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?

推荐答案

如何使菜单再次完整以指向正确的版本?

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

如果您想再次打开菜单,您应该从您的网站项目中卸载包Microsoft.CodeDom.Providers.DotNetCompilerPlatform".

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

然后指向正确的版本.

此外,如果您想解决错误Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2" is not found ...",您可以从 nuget.org 带有版本 1.0.2. 然后将其设置到文件夹 C:\Program Files (x86)\Microsoft Web Tools\Packages\.在这种情况下,当您启用Enable C#6/VB 14".

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".

这篇关于Visual Studio 2017 网站菜单“启用 C# 6/VB 14"无法加载 Nuget 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆