-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Blazor] Creating a .nupkg of a blazorlib with dotnet pack includes the .razor files #9577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@danroth27 That's orthogonal to the static context, we should do this on the razor SDK, the same way we mark .cshtml files as pack=false. @pranavkm thoughts? |
It's marked as content, but we don't disable including it during pack https://github.com/aspnet/AspNetCore-Tooling/blob/master/src/Razor/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets#L475. |
Fixed as part of |
Thanks for the work around! |
Describe the bug
Running
dotnet pack
on a blazorlib project includes the.razor
files in the.nupkg
, making the package produce duplicates on reference and be unusable.To Reproduce
Steps to reproduce the behavior:
Workaround
I added the following in my csproj to prevent the .razor files from being included in the nupkg
Screenshots
Contents of .nupkg

The text was updated successfully, but these errors were encountered: