With a web project set to use 4.4 explicitly via the Projet Properties, TypeScript Build:
Note that it says "unavailable".
I get this warning when opening the project with VS2022:
PROJECT.X specifies TypeScript version 4.4, but a matching compiler was not found. Would you like us to update your project to use TypeScript 4.3?
If I change the TypeScript version to "Use latest available":
On loading, the warning becomes:
PROJECT.X is built using TypeScript 4.3, but the TypeScript language service version currently in use by Visual Studio is 4.4. This may be caused by other projects in the solution using a different version of TypeScript. Would you like us to update your project to use TypeScript 4.4?
So these seem to say VS has a 4.4 language service, but not the matching compiler?
I have read:
- https://learn.microsoft.com/en-us/visualstudio/javascript/javascript-in-visual-studio?view=vs-2019 which explains the usage of TypeScript NuGet, npm or SDK. I use the npm method. I don't have the Microsoft.Typescript.MSBuild package installed, and I have no Typescript SDK installed in Windows.
- https://github.com/Microsoft/TypeScript/issues/21569#issuecomment-362748498 which explains the difference between the Language Service and the build Tools, dated 2018, not sure it's relevant in VS 2022. Interestingly, it also says the "version picker is only applicable if you are using the global installed version of the SDK, if you are using Nuget to build, then it is only used for picking the language service." This issue shows "(unavailable)" in the version dropdown, like me.
- project specifies TypeScript version 2.8, but a matching compiler was not found which has a similar compiler missing warning.
- TypeScript version mismatch in Visual Studio 2019 which is identical to me, but for VS2019. One solution is via the NuGet package, and the accepted solution mentions moving
$(PATH)
to the top of the list in Options, Projects and Solutions, Web Package Management, External Web Tools.
How do I get rid of these warnings?