Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor Client - error NETSDK1082: 'browser-wasm'

$
0
0

I created a simple blazor wa project hosted option selected. In the client side of the project in the project it automatically comes with <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">. I then added a few nuget packages before writing any code and when I clean the solution and even rebuild the solution it gives me the error:

error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.

I looked it up and saw that one solution to this is to change the first line in the .csproj to <Project Sdk="Microsoft.NET.Sdk.Web"> instead of what it comes with by default. I did so but then when I run just the client it says 404. Then if I remove the extra packages and put it back to the default sdk it works. Is there a reason why I am getting this error with those packages? I created a blazor wa hosted .net 6 project btw.

my client.csproj

<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net6.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings></PropertyGroup><ItemGroup><PackageReference Include="Blazored.LocalStorage" Version="4.1.5" /><PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.12" /><PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.0" /><PackageReference Include="Microsoft.AspNetCore.Components.ProtectedBrowserStorage" Version="5.0.0-rc.1.20451.17" /><PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" /><PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" /><PackageReference Include="Microsoft.Identity.Web" Version="1.21.0" /><PackageReference Include="Newtonsoft.Json" Version="13.0.1" /><PackageReference Include="RestSharp" Version="106.13.0" /></ItemGroup></Project>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>