I have a unique ASP.NET MVC / Angular2 project that utilizes MSBuild for compiling my Typescript files. Within the project, there is the complete Angular2 source code along with its NodeJS dependencies, in addition to my own Angular2 code (app.ts
, etc.).
The issue I am facing is that MSBuild is compiling every single Typescript file within the entire solution - including the Angular2 source code, its dependencies, and my app.ts
code. I specifically want to exclude any Typescript files located in the node_modules
folder from being compiled.
My understanding is that typically tsconfig.json
files are responsible for excluding certain files or directories from compilation (as discussed in this question), but the .csproj
files within ASP.NET projects take precedence over tsconfig.json
. Therefore, I am trying to determine what needs to be included in the .csproj
file to instruct MSBuild and tsc.exe
to avoid compiling specific files or folders.
The guidance provided in the MSBuild Typescript compiler options documentation has not been useful. I am reaching out to see if anyone might have some insights into this situation.