在没有 roslyn 的情况下发布网站 [英] Publish website without roslyn

查看:31
本文介绍了在没有 roslyn 的情况下发布网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Visual Studio 2015 和 .NET 4.5.1 创建 Web 应用程序.当我发布网站时,visual studio 创建名为 roslyn 的文件夹.

I am trying to create web application using Visual Studio 2015 and .NET 4.5.1. When I publish the website, visual studio create folder named roslyn.

我知道它用于即时编译代码,但不幸的是,我的托管服务提供商不允许我在他们的服务器上执行编译器.

I know it's used to compile code on the fly, but unfortunately my hosting provider doesn't allow me to execute the compiler on their server.

如何像以前版本的 Visual Studio 那样在没有 roslyn 的情况下发布网站?

How to publish the website without roslyn like previous version of Visual Studio?

我在尝试访问我的网站时遇到此错误.

I got this error when trying to acces my website.

似乎 IIS 试图执行 roslyncsc.exe,但我的用户帐户无权执行此操作.使用以前版本的 Visual Studio,不会出现此错误.

It seems IIS trying to execute roslyncsc.exe but my user account doesn't have permission to do that. With previous version of Visual Studio, this error doesn't show up.

推荐答案

我刚刚遇到了同样的问题.当您创建一个新的 Web 项目时,两个 nuget 包会自动添加到您的项目中.如果您删除它们,您的问题应该可以解决.包名称为:Microsoft.CodeDom.Providers.DotNetCompilerPlatform"和Microsoft.Net.Compilers".

I've just faced the same problem. When you create a new web project, two nuget packages automatically added to your project. If you remove them, your problem should be solved. Package names are: "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" and "Microsoft.Net.Compilers".

这篇关于在没有 roslyn 的情况下发布网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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