没有roslyn的发布网站 [英] Publish website without 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试图执行roslyn\csc.exe
,但是我的用户帐户没有执行此操作的权限.在Visual Studio的早期版本中,不会显示此错误.
It seems IIS trying to execute roslyn\csc.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屋!