Reputation: 1093
Visual Studio 2022, Version 17.2.5 released with support of dot NET Ver 6.0.301.
In this version, if you publish the blazor webassembly project, you got error:
C:\Program Files\dotnet\sdk\6.0.301\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): Error MSB6006: "dotnet.exe" exited with code 1.
This error is a bug on dot NET 6.0.301 and you have to downgrade the system or change project to use dot NET version to 6.0.300.
Upvotes: 0
Views: 147
Reputation: 1093
First of all, Open Microsoft dot NET download page:
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.300-windows-x64-installer
Download and Install the earlier version (6.0.300).
Add global.json file to solution in file explorer. (close to X.sln file)
Well, at the end, you have to paste this content to global.json file:
{ "sdk": { "version": "6.0.300" } }
Upvotes: 1