-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed as not planned
Closed as not planned
Copy link
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-static-web-assetsquestion
Milestone
Description
Describe the bug:
An RCL (or a plain 'class library') with a wwwroot folder that has a nuget dependency of a library with static assets duplicates the publish of those assets
Version used:
e.g. VS2022 17.3.0 Preview 2
To reproduce:
Steps to reproduce the behavior:
- Create a new RCL in a solution
- Create a wwwroot folder in that RCL
- Use the nuget package manager to add a reference to Material.Blazor
- After a short period of time you will observe 6 css/js files get referenced as links in wwwroot of the RCL
- Publish your solution (it is sufficient to publish locally to a directory)
- Examine the wwwroot _content folder in the published output
- Note the the content for Material.Blazor is replicated in your RCL content.
- In this particular case there is an added 2.5Mb of content that serves no purpose.
- It is very difficult to exclude these static assets as the path for each developer and github action is different since it references the path to the local github repository. This makes DefaultItemExcludes rather worthless. As an example, my references are in the form of
"C:\Users\ms\.nuget\packages\material.blazor\3.0.0-preview.1\contentFiles\any\net6.0\wwwroot\material-components-web.css"
and the next developer could have references like
"C:\Users\sz\.nuget\packages\material.blazor\3.0.0-preview.1\contentFiles\any\net6.0\wwwroot\material-components-web.css"
Expected behavior:
I don't expect that referencing a nuget package with static assets in an RCL will cause those assets to be published.
Actual behavior:
See point 7 above
Edit:
- Clarified that the same issue occurs if you include the nuget reference in a class library
Additional context:
Add any other context about the problem here.
.NET SDK (reflecting any global.json):
Version: 6.0.400-preview.22301.10
Commit: 25580ffe7a
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.400-preview.22301.10\
Host (useful for support):
Version: 6.0.6
Commit: 7cca709db2
.NET SDKs installed:
3.1.420 [C:\Program Files\dotnet\sdk]
6.0.301 [C:\Program Files\dotnet\sdk]
6.0.400-preview.22301.10 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
C:\Users\ms>
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-static-web-assetsquestion