Web 应用程序构建错误:无法找到 CodeDom 提供程序类型 Microsoft.VisualC.CppCodeProvider [英] Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located

查看:15
本文介绍了Web 应用程序构建错误:无法找到 CodeDom 提供程序类型 Microsoft.VisualC.CppCodeProvider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建服务器中构建/打包一个 Web 应用程序,但它失败并显示以下消息:

I'm building/packing a web application in a build server, and it fails with the following message:

ASPNETCOMPILER 错误 ASPCONFIG:CodeDom 提供程序类型Microsoft.VisualC.CppCodeProvider,CppCodeProvider,版本=10.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 不能位于.

ASPNETCOMPILER error ASPCONFIG: The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.

这是构建服务器环境:

  • Windows Server 2008 R2 标准版
  • 团队城市 8.0.4
  • .NET 4.5
  • 适用于 Windows 7 和 .NET 4 的 Windows SDK
  • 适用于 Windows 8 和 .NET 4.5 的 Windows SDK
  • 便携式类库工具
  • ASP MVC 4

它是一个 ASP MVC 4 Web 应用程序,面向 .NET 4.5.

It is a ASP MVC 4 web application, targeting .NET 4.5.

构建配置包括使用 MSBuild 构建解决方案,并将其部署到包中,以便稍后发布.

The build configuration consists in building the solution with MSBuild, and deploying it to a package, so I can publish it later.

通过TeamCity的日志可以看到MSBuild运行aspnet_compiler.exe时出现的错误.

Through the log of TeamCity, I can see the error arising when MSBuild runs aspnet_compiler.exe.

在我的 DEV 机器上构建没有问题,也可以毫无问题地将其发布到本地 IIS.

The builds with no problem in my DEV machine and can also publish it to a local IIS without problems.

有谁知道是什么导致了这个问题?

Does anyone know what may be causing this issue?

更新

在下面查看我的答案.

推荐答案

对我来说,这个错误是在 VS2017 构建 web 项目时弹出的.修复是使 node_modules 目录隐藏在文件资源管理器中.显然,这会阻止 ASP.NET 编译器扫描所有这些文件,从而防止错误.

For me this error was popping up in VS2017 when building the web project. The fix was to make the node_modules directory hidden in File Explorer. Apparently this stops the ASP.NET compiler from scanning all these files and thus prevents the error.

这篇关于Web 应用程序构建错误:无法找到 CodeDom 提供程序类型 Microsoft.VisualC.CppCodeProvider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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