I have one Server project and now trying to convert it into Progressive Web Application. When I reference the API, Model, and UI projects to it then the following error comes out:
<Target Name="_FailIfReferencingAspNetCoreApp" BeforeTargets="ResolveRuntimePackAssets">
<Error
Code="BLAZORSDK1001"
Text="The project references the ASP.NET Core shared framework, which is not supported by Blazor WebAssembly apps. Remove the framework reference if directly referenced, or the package reference that adds the framework reference."
Condition="'@(FrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->Count())' != '0'" />
</Target>
The following code is the .csproj of the project, is there something I'm missing?
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>
<ItemGroup>
<Content Remove="wwwroot\service-worker.js" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.Toast" Version="3.1.2" />
<PackageReference Include="BlazorInputFile" Version="0.2.0" />
<PackageReference Include="DevExpress.Blazor" Version="20.1.7" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.11" />
<PackageReference Include="Hangfire.Core" Version="1.7.11" />
<PackageReference Include="Hangfire.SqlServer" Version="1.7.11" />
<PackageReference Include="LiquidTechnologies.Blazor.ModalDialog" Version="0.9.7" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.2.0-preview3.20168.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.4" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.5" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client.Core" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="QRCoder" Version="1.4.1" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="8.0.1" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="5.3.0" />
<PackageReference Include="Tewr.Blazor.FileReader" Version="2.0.0.20200" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DataAccess\DataAccess.csproj" />
<ProjectReference Include="..\UI\UI.csproj" />
<ProjectReference Include="..\API\API.csproj" />
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
</Project>
Are there any suggestions on solving this issue?