question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Blazor] Cannot create Nuget package if files exist inside wwwroot

See original GitHub issue

Describe 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

  1. Download the repro https://github.com/mrpmorris/blazor-package-error
  2. CD into the Source folder
  3. Run dotnet build or build it in VS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mrpmorriscommented, Nov 12, 2020

@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

1reaction
msftbot[bot]commented, Nov 16, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found