4
votes

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:

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

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). 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. 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++...

1
What kind of project?SLaks
A Visual Studio ASP.NET MVC project, I'll update the question.muttley91
What exactly is the error coming from?SLaks
Having the same issue. Because I can't find any reasonable solution I am considering to downgrade Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers again...timmkrause
That didn't solve it either. So my best guess is that this has either something to do with a VS 2017 update or the installation of the latest .NET Framework on my machine...timmkrause

1 Answers

5
votes

It's been a while, but I just had this problem with VS 2019 ... I was able to fix it by changed the properties of the node_modules folder(s) to hidden in the file system.