Skip to content

Packaging of static assets of razor libraries is different in Githhub Actions from Local Computer #61140

Open
@rbuergi

Description

@rbuergi

I had already asked the following issue: #60680. You have kindly explained to me how to configure the razor libs to create proper nuget packages. This setup works perfectly when I build the packages locally. I can also use them in a Blazor project, and all the js files get added to the staticwebassets folder.

However, when I try to build the razor library with the exact same commands on github actions under linux, I get warnings for the javascript files that

Warning: /usr/share/dotnet/sdk/9.0.202/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(221,5): warning NU5118: File '/home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Blazor/wwwroot/arc--U5YtJTU.js' is not added because the package already contains file 'contentFiles/any/net9.0/wwwroot/arc--U5YtJTU.js' [/home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Blazor/MeshWeaver.Blazor.csproj]

this pattern repeats for all javascript files.

In the published package, the js files get correctly added under contentFiles/any/net9.0/wwwroot, but they are missing from staticwebassets.

I have executed the exact same commands from the github action on my local machine, and the packages build fine. What's the difference between running the command on my local machine versus github actions? I really don't know how to advance on this; I wouldn't like to publish packages from my local PC....

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuearea-ui-renderingIncludes: MVC Views/Pages, Razor Views/Pagesinvestigate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions