The problem I've encountered is in a solution with many projects (one of them being a angular-cli project targeting es5) is that, since Microsoft developed Typescript, they are over eager to attempt to compile without fully knowing the angular-cli story. Therefore (TS) errors frustratingly crop up frequently between builds and hide what would otherwise be a valid error.
How can I ensure that Visual Studio will ignore these Typescript errors and not show them at all post-build?
Turns out, since angular-cli uses it's own configuration file for builds, it's safe to modify the
tsconfig.json
file that Microsoft checks before builds. My solution was to modify mytsconfig.json
as follows:Effectively blocking Visual Studio compilation and instead defaulting to ng-build (which itself is configured to output to wwwroot) Which also plays nice when hitting the "run" button in Visual Studio.
.csproj
angular-cli.json
One more thing...
You'll also have to set the default path in your Startup.cs file: