I'm currently working on a .NET 5.0 Blazor WebAssembly application.
I use a Blazor Component library, which I want to add to my Project solution as a reference.
My project structure looks like this:
1. GardenApp:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<TargetFramework>net5.0</TargetFramework>
2. FruitsComponents:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<TargetFramework>net5.0</TargetFramework>
When I reference my FruitsComponents library as a NuGet package in my GardenApp it works fine, but when I try to reference the FruitsComponents library as a project in my GardenApp.
I already tried in vain:
- Include project reference (FruitsComponents => into Project of GardenApp, first added project to Solution)
- Include DLL alone (FruitsComponents.dll => into Project of GardenApp)
I get the following errors:
1) MSB4018 The "GenerateServiceWorkerAssetsManifest" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\Farmer\Git\GardenApp\src\GardenApp\Client\obj\Debug\net5.0\FruitsComponents.pdb'.
and the second Error:
- Conflicting assets with the same path '/wwwroot/_framework/de-DE/FruitsComponents.resources.dll' for content root paths 'obj\Debug\net5.0\de-DE\SSW.FruitsComponents.resources.dll' and 'C:\Users\Farmer\Git\FruitsComponents\src\FruitsComponents\bin\Debug\net5.0\de-DE\FruitsComponents.resources.dll'. GardenApp.App.Server C:\Program Files\dotnet\sdk\5.0.101\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets 208
Do you know how to reference a component library of type Microsoft.NET.Sdk.BlazorWebAssembly in a Blazor project of type Microsoft.NET.Sdk.BlazorWebAssembly - or any other ideas on how to solve this issue?