I’m getting the following error when I create a Blazor WebAssembly project from the template in Visual Studio Professional 2022:
The result "" of evaluating the value
"$(MonoTargetsTasksAssemblyPath)" of the "AssemblyFile" attribute
in element <UsingTask> is not valid. C:Program
FilesdotnetpacksMicrosoft.NET.Runtime.WebAssembly.Sdk9.0.0
SdkWasmApp.Common.targets
It happens when I attempt to load the Client project. The options I chose in the template were:
.NET 9
Authentication: None
Interactive Render Mode: WebAssembly
Interactivity Location: Global
Include sample pages: checked
Choosing the same options with .NET 8 works fine. I installed both .NET 8 and .NET 9 with Visual Studio Pro 2022 and included the Wasm build tools for each. I also tried installing the wasm tools with dotnet workload install wasm-tools
. And I’ve uninstalled Visual Studio completely and reinstalled it. Can’t seem to find any info about this specific message anywhere either.
This was working up until yesterday. The only thing of note that I can think of that might affect this is that I cleared all my nuget caches in Rider. After that, I received a different error when building the client project: The target “ResolveWasmOutputs” does not exist in the project. I’d get that when I created new Blazor projects from the template in either .NET 8 or .NET 9 so I uninstalled and reinstalled Visual Studio 2022 and now I’m getting the error above.