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

查看:994
本文介绍了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, 文化=中性,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 Standard
  • TeamCity 8.0.4
  • .NET 4.5
  • 用于Windows 7和.NET 4的Windows SDK
  • 用于Windows 8和.NET 4.5的Windows SDK
  • 便携式类库工具
  • ASP MVC 4

这是一个针对.NET 4.5的ASP MVC 4 Web应用程序.

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?

更新

在下面查看我的答案.

推荐答案

对我来说,构建Web项目时,此错误在VS2017中弹出.解决方法是将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天全站免登陆