编译错误 - 出版后asp.net错误 - 错误code 1失败,编译器 [英] Compilation Error - The compiler failed with error code 1 - asp.net error after publishing
本文介绍了编译错误 - 出版后asp.net错误 - 错误code 1失败,编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
公布我的asp.net MVC 5网站托管环境后,我得到了以下错误消息
After publishing my asp.net MVC 5 website to the hosting environment, I got the following error message
Compilation Error - The compiler failed with error code 1
除了其他编译器调用本身没有任何显示。
Nothing else besides the compiler-call itself is shown.
推荐答案
在我的情况下,MVC模板添加在的web.config
文件中的以下部分:
In my case, the MVC-templates added the following section in the web.config
file:
<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>
删除它们后,一切都如预期。
After removing them, everything worked as expected.
这篇关于编译错误 - 出版后asp.net错误 - 错误code 1失败,编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文