简体   繁体   English

无法找到 CodeDom 提供程序类型“Microsoft.VisualC.CppCodeProvider”,尝试编译 node_modules

[英]CodeDom provider type 'Microsoft.VisualC.CppCodeProvider' could not be located, trying to compile node_modules

I'm trying to compile my ASP.NET MVC project after adding in a project with a node_modules folder, and it gives me the following error:我在添加一个带有 node_modules 文件夹的项目后尝试编译我的 ASP.NET MVC 项目,它给了我以下错误:

The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, Version 10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.无法找到 CodeDom 提供程序类型“Microsoft.VisualC.CppCodeProvider,版本 10.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”。

Probably because in my node_modules folder (which is gigantic, so it's difficult to determine which module is causing the problem) has a C++-like file in it somewhere (possibly a .h file or something).可能是因为在我的 node_modules 文件夹(它是巨大的,所以很难确定是哪个模块导致问题)中的某个地方有一个类似 C++ 的文件(可能是一个 .h 文件或其他东西)。 So I excluded the node_modules folder from my project so that it wouldn't try to build it, but I still get the same error.所以我从我的项目中排除了 node_modules 文件夹,这样它就不会尝试构建它,但我仍然遇到相同的错误。 Is there some way to make it not compile that folder, or at least some easier way to determine what might be causing it?有没有办法让它不编译那个文件夹,或者至少有一些更简单的方法来确定可能导致它的原因? I don't have any C++ in my solution otherwise, so I don't really want it to even try compiling C++...否则,我的解决方案中没有任何 C++,所以我什至不希望它尝试编译 C++...

已经有一段时间了,但我刚刚在 VS 2019 中遇到了这个问题......我能够通过将 node_modules 文件夹的属性更改为隐藏在文件系统中来修复它。

I moved my solution from VS2019 to VS2022 and was having this error when I tried to publish the solution.我将我的解决方案从 VS2019 移到了 VS2022,并且在我尝试发布解决方案时遇到了这个错误。 This is how I made the error disappear.这就是我使错误消失的方式。

  • Right-click on References>> Add References右键单击“引用”>>“添加引用”
  • Then Search for Microsoft.VisualC然后搜索 Microsoft.VisualC
  • tick Microsoft.VisualC and Microsoft.VisualC.VSCodeProvider勾选 Microsoft.VisualC 和 Microsoft.VisualC.VSCodeProvider
  • click ok.单击确定。 Error gone!错误消失!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Web 应用程序构建错误:无法找到 CodeDom 提供程序类型 Microsoft.VisualC.CppCodeProvider - Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located 缺少Microsoft.VisualC.CppCodeProvider - c# - Microsoft.VisualC.CppCodeProvider missing 无法找到CodeDom提供程序类型“Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider ...” - The CodeDom provider type “Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider …” could not be located "找不到 CodeDom 提供程序类型“Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider”" - The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider" could not be located 如何修复配置错误“无法找到 CodeDom 提供程序类型”和解析错误“无法加载类型”导致彼此? - How to fix configuration error 'The CodeDom provider type could not be located' and parsing error 'Could not load type' leading to each other? 找不到 ASP.NET CodeDom 提供程序错误 - ASP.NET CodeDom provider could not be located error .Net / IIS服务器错误-找不到CodeDOM提供程序类型 - .Net / IIS server error - CodeDOM Provider Type Could Not Be Found CodeDom编译类型或命名空间错误 - CodeDom Compile The Type or Namespace Error CKFinder Zip 安装 CodeDom Provider Type 异常 - CKFinder Zip installation CodeDom Provider Type exception 网站项目上的Roslyn编译器错误。 找不到CodeDom - Roslyn Compiler Error on Website project. CodeDom could not be located
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM