编译错误 - 编译器失败,错误代码 1 - 发布后出现 asp.net 错误

Compilation Error - The compiler failed with error code 1 - asp.net error after publishing

将我的 asp.net MVC 5 网站发布到托管环境后,我收到以下错误消息

Compilation Error - The compiler failed with error code 1

除了编译器调用本身之外,没有显示任何其他内容。

就我而言,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=\&quot;Web\&quot; /optionInfer+" />
</compilers>

删除它们后,一切正常。

重新启动服务器,为我解决了问题。