There is no runtime pack availabel for Microsoft.AspNetCore.App Blazor WASM

Prathamesh Shende 376 Reputation points
2022-11-14T12:47:43.35+00:00

Build started...
1>------ Build started: Project: Books.Client, Configuration: Debug Any CPU ------
1>C:\Program Files\dotnet\sdk\7.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(448,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.
1>Done building project "Books.Client.csproj" -- FAILED.

==========
Build: 0 succeeded, 1 failed, 4 up-to-date, 0 skipped ==========

==========
Elapsed 00:01.820 ==========

I m getting this error
My project is in .net 6 and i have all packages installed and working properly but i get this error after updating visual studio 17.4 after .net 7 launch.
I have another pc, project working fine but not on this.

I ran dotnet restore command but does not solve this issue

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,385 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Prathamesh Shende 376 Reputation points
    2022-11-16T07:46:42.51+00:00

    <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

    <PropertyGroup>  
    	<TargetFramework>net6.0</TargetFramework>  
    	<UseBlazorWebAssembly>true</UseBlazorWebAssembly>  
    	<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>  
    	<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>  
    	<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>  
    	<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>  
    	  
    </PropertyGroup>  
    
    <ItemGroup>  
    	<Compile Remove="Pages\RecurringSales\**" />  
    	<Compile Remove="Pages\UserActivities\**" />  
    	<Content Remove="Pages\RecurringSales\**" />  
    	<Content Remove="Pages\UserActivities\**" />  
    	<EmbeddedResource Remove="Pages\RecurringSales\**" />  
    	<EmbeddedResource Remove="Pages\UserActivities\**" />  
    	<None Remove="Pages\RecurringSales\**" />  
    	<None Remove="Pages\UserActivities\**" />  
    </ItemGroup>  
    
    <ItemGroup>  
    	<Compile Remove="Services\ProformasService.cs" />  
    </ItemGroup>  
    
    <ItemGroup>  
    	<Content Remove="C:\Users\Prathamesh\.nuget\packages\bc.indexeddb\1.7.2\contentFiles\any\netstandard2.0\file1.ts" />  
    	<Content Remove="C:\Users\Prathamesh\.nuget\packages\bc.indexeddb\1.7.2\contentFiles\any\netstandard2.0\package-lock.json" />  
    	<Content Remove="C:\Users\Prathamesh\.nuget\packages\bc.indexeddb\1.7.2\contentFiles\any\netstandard2.0\package.json" />  
    	<Content Remove="C:\Users\Prathamesh\.nuget\packages\bc.indexeddb\1.7.2\contentFiles\any\netstandard2.0\tsconfig.json" />  
    	<Content Remove="compilerconfig.json" />		  
    </ItemGroup>  
    
    <ItemGroup>  
    	<None Include="compilerconfig.json" />  
    	<None Include="Components\Connection.razor" />  
    	<None Include="Components\GridView.razor" />  
    	<None Include="Components\PageName.razor" />  
    	<None Include="Components\SearchBox.razor" />  
    	<None Include="Components\Spinner.razor" />  
    	<None Include="Pages\Settings\UserAccess\Index.razor" />  
    	<None Include="Pages\Settings\UserAccess\Roles\Create.razor" />  
    	<None Include="Pages\Settings\UserAccess\Roles\Edit.razor" />  
    	<None Include="Pages\Settings\UserAccess\Roles\Index.razor" />  
    	<None Include="Pages\Settings\UserAccess\UserLogins\Create.razor" />  
    	<None Include="Pages\Settings\UserAccess\UserLogins\Edit.razor" />  
    	<None Include="Pages\Settings\UserActivity\Index.razor" />  
    	<None Include="wwwroot\js\site.js" />  
    	<None Include="wwwroot\lib\bootstrap-select\bootstrap-select.css.map" />  
    	<None Include="wwwroot\lib\bootstrap-select\bootstrap-select.js" />  
    	<None Include="wwwroot\lib\bootstrap-select\bootstrap-select.js.map" />  
    	<None Include="wwwroot\lib\bootstrap-select\bootstrap-select.min.js" />  
    	<None Include="wwwroot\lib\bootstrap-select\bootstrap-select.min.js.map" />  
    	<None Include="wwwroot\lib\bootstrap\LICENSE" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-brands-400.svg" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-brands-400.woff2" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-regular-400.svg" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-regular-400.woff2" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-solid-900.svg" />  
    	<None Include="wwwroot\lib\line-awesome\fonts\la-solid-900.woff2" />  
    	<None Include="wwwroot\lib\popper\popper.min.js" />  
    	<None Include="wwwroot\lib\popper\popper.min.js.map" />  
    </ItemGroup>  
    
    <ItemGroup>  
    	<PackageReference Include="Ardalis.SmartEnum" Version="2.1.0" />  
    	<PackageReference Include="Blazor.ContextMenu" Version="1.14.0" />  
    	<PackageReference Include="BlazorDateRangePicker" Version="4.2.0" />  
    	<PackageReference Include="Blazored.FluentValidation" Version="2.0.3" />  
    	<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />  
    	<PackageReference Include="Blazored.SessionStorage" Version="2.2.0" />  
    	<PackageReference Include="Blazored.TextEditor" Version="1.0.8" />  
    	<PackageReference Include="EPPlus" Version="6.1.0" />  
    	<PackageReference Include="Humanizer.Core" Version="2.14.1" />  
    	<PackageReference Include="IdentityModel" Version="6.0.0" />  
    	<PackageReference Include="IndexedDB.Blazor" Version="1.1.1" />  
    	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.11" />  
    	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.11" />  
    
    	<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.11" PrivateAssets="all" />  
    	<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.11" />  
    	<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />  
    	<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />  
    	<PackageReference Include="Tewr.Blazor.FileReader" Version="3.3.1.21360" />  
    	<PackageReference Include="WebPush" Version="1.0.12" />  
    </ItemGroup>  
    
    <ItemGroup>  
    	<ProjectReference Include="..\..\..\BootstrapComponent\BootstrapComponents.csproj" />  
    	<ProjectReference Include="..\..\..\Tagify\Tagify.csproj" />  
    	<ProjectReference Include="..\..\Stack.Data\Stack.Data.csproj" />  
    	<ProjectReference Include="..\Shared\Books.Shared.csproj" />  
    </ItemGroup>  
    
    <ItemGroup>  
    	<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />  
    </ItemGroup>  
    

    </Project>

    0 comments No comments

  2. David Marsh 1 Reputation point
    2022-12-01T03:19:29.52+00:00

    Having the same issue


  3. natalia sandalo 0 Reputation points
    2023-02-24T03:20:50.15+00:00

    Same here. Can you share for us how did you solve that issue?

    0 comments No comments

  4. Karlis K 0 Reputation points
    2023-07-14T09:52:50.33+00:00

    If someone still has this error. Here's what worked for me.

    I had similar issue when I updated my nuget packages from net 6.x to net 7.x
    Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. Client (Source\Web\Client\Client)

    First try I updated all packages randomly for all project at the same time. Did not work, and had this Error.

    Reversed all changes, cleaned solution, deleted bin and obj folders for each project folder. Rebuild solution. To start over from working branch.

    1. changed for all projects <TargetFramework>net7.0</TargetFramework>
    2. Then I started to update starting with Client (that had the Error) project and only updated packages that had 6.x versions updatable to 7.x version.
      Updated projects one by one. Built them one by one.

    Did not have this Error anymore.
    Still some Packages left, but Solution build and project runs.

    0 comments No comments

  5. mostafa heidary 0 Reputation points
    2023-07-31T10:09:33.32+00:00

    It May sound crazy, But solved after syncing all package versions of all projects, then closing vs and running again with [Run as administrator]. then rebuild all and problem solved.

    0 comments No comments