[英]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.
这就是我使错误消失的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.