nenoNaninu / TypedSignalR.Client.TypeScript

TypeScript source generator to provide strongly typed SignalR clients by analyzing C# type definitions.
MIT License
98 stars 11 forks source link

Error when using .net9.0 SDK: No instances of MSBuild could be detected #254

Open mansellan opened 5 days ago

mansellan commented 5 days ago

Hi,

Fantastic work, much appreciated. I initially got an error running the source generator with only the net9.0 SDK installed:

PS C:\Repos\Web> dotnet --list-sdks
9.0.100-rc.2.24474.11 [C:\Program Files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]
PS C:\Repos\Web> dotnet tsrts --project .\Test.csproj --output generated
Unhandled exception. System.InvalidOperationException: No instances of MSBuild could be detected.
Try calling RegisterInstance or RegisterMSBuildPath to manually register one.
   at Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()

The fix was to install the net7.0 SDK, then it worked fine.

mansellan commented 5 days ago

Although I'm also now getting bitten by #239