Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located(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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Web 应用程序构建错误:无法找到 CodeDom 提供程序类


- 如何用自己压缩一个 IEnumerable 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- MoreLinq maxBy vs LINQ max + where 2022-01-01