How to disable warning 'Please install the 'Microsoft.TypeScript.MSBuild' NuGet package to enable TypeScript compilation in your project.'?
I do not need TS compilation with MSBuild - I do it with custom tools (building webpack
bundle, manaually or with devserver).
After changing build action to "Content" warning still exists (details: was "none", this is the only one ts file in the project, solution restart doesn't help; but there are other TS files in other projects and may be they "hooked" somehow the MSBuild warning for all projects with ts files)
It looks like this might be fixed in VS2022, but if you're still on VS2019 the following worked for me:
<PropertyGroup>
<TypeScriptToolsVersion>4.2</TypeScriptToolsVersion>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
</PropertyGroup>
You'd manually add this to your .csproj file. I had to close and re-open VS afterwards too, but I don't get the error anymore. It also wanted to install TS version 4.2 but it doesn't seem to be compiling with it. Still not a great solution, but it's probably all we've got until Microsoft fixes it:
https://developercommunity.visualstudio.com/t/permanent-warning-please-install-the-microsofttype/1555740
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With