[Blazor] Cannot create Nuget package if files exist inside wwwroot
See original GitHub issueDescribe the bug
I have a repro that is simply a razorclasslib with multiple target frameworks. When it builds there is an error
NU5118 File ‘D:\Temp\blazor-package-error\Source\Fluxor.Blazor.Web\wwwroot\scripts\index.js’ is not added because the package already contains file ‘staticwebassets\scripts\index.js’ Fluxor.Blazor.Web C:\Program Files\dotnet\sdk\5.0.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets 207
To Reproduce
- Download the repro https://github.com/mrpmorris/blazor-package-error
- CD into the Source folder
- Run
dotnet build
or build it in VS
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Nuget package content files not served when deployed
They work fine when I directly reference RCL project, but when packed with NuGet and installed does not work any more.
Read more >Confused why Boostrap CSS 404's? : r/Blazor
It seems that VS doesn't like how the Bootstrap Nuget package links to the files instead of copying them into your project. There...
Read more >NETSDK1004: Assets file not found - .NET CLI
You have a source in the <packageSources> section in the NuGet.Config file with a path that doesn't exist. To resolve the error, edit...
Read more >Use LibMan with ASP.NET Core in Visual Studio
If the libman.json file doesn't already exist in the project root, it will be created with the default item template content.
Read more >Unable to find package Telerik.UI.for.Blazor
Attempting to create new Telerik Blazor solution,. ... Blazor. No packages exist with this id in source(s): Local Packages, Microsoft Visual ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mkArtakMSFT That is not the case. In the repro there is 1 project with 1 file in wwwroot - but there are multiple TargetFrameworks in the csproj file
Thanks for contacting us. We’re moving this issue to the
Next sprint planning
milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.