VS 2017中设置防止项目默认使用Roslyn

发布于 2025-01-12 09:37:50 字数 516 浏览 2 评论 0原文

每当我使用 Visual Studio 2017 创建新的 Web 项目时,它都会使用名为 packages.config 的文件创建它,该文件包含以下参考:

Microsoft.CodeDom.Providers.DotNetCompilerPlatform

<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net461" />

在我的工作中,我们不允许使用任何 nuget 包。 因此,每次我都必须手动卸载 Microsoft.CodeDom.Providers.DotNetCompilerPlatform,这将删除 packages.config 文件并更新我的 web.config 文件。

当我创建项目本身时,有没有办法阻止 Visual Studio 2017 执行此操作?

谢谢你!

Whenever I create a new web project using my visual studio 2017, it creates it with a file named packages.config which contains reference for:

Microsoft.CodeDom.Providers.DotNetCompilerPlatform

<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net461" />

At my work we are not allowed to use any nuget packages.
So everytime I have to manually go and uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform, which will remove the packages.config file and updates my web.config file.

Is there a way I can prevent visual studio 2017 from doing this when I create a project itself?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文