I recently upgraded the project from .NET 6 to .NET 8. It consists of Blazor web server (host) and Blazor web assembly (client). The application builds and runs successfully in the local environment, but I'm getting an error when trying to publish the package:
C:\Program Files\dotnet\sdk\8.0.203\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.References.targets(16,5): error : Manifest file at 'obj\Release\net8.0\staticwebassets.build.json' not found.
csproj file of host side:
<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net8.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings><LangVersion>12</LangVersion></PropertyGroup> (...)</Project>
csproj file of client side:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"><PropertyGroup><TargetFramework>net8.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings><StaticWebAssetBasePath>app1</StaticWebAssetBasePath><LangVersion>12</LangVersion></PropertyGroup> (...)</Project>