在将我的asp.net MVC 5网站发布到宿主环境后,我得到了以下错误消息
Compilation Error - The compiler failed with error code 1除了编译器-调用本身,什么都没有显示。
发布于 2015-10-24 09:47:27
在我的示例中,MVC模板在web.config文件中添加了以下部分:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
移除它们之后,一切都如期而至。
发布于 2021-04-09 13:47:32
重新启动服务器,帮我解决了问题。
https://stackoverflow.com/questions/33316738
复制相似问题