Skip to content
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

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

Open
rbuergi opened this issue Mar 24, 2025 · 4 comments
Labels
area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update.

Comments

@rbuergi
Copy link

rbuergi commented Mar 24, 2025

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Mar 24, 2025
@javiercn
Copy link
Member

@rbuergi thanks for contacting us.

Capture an msbuild binlog and check the casing on the paths in the binlog.

@javiercn javiercn added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Mar 25, 2025
@rbuergi
Copy link
Author

rbuergi commented Mar 25, 2025

Hi @javiercn. Thanks for resonding so quickly. This is the entire log from github actions. At least judging on my windows setup, the casings seem to be correct... However, I wonder why I get all the duplicate messages which I don't get on Windows.

job-logs.txt

@dotnet-policy-service dotnet-policy-service bot added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Mar 25, 2025
@javiercn
Copy link
Member

@rbuergi thanks for the additional details.

Unfortunately, the logs we need are the MSBuild binlogs generated with dotnet build /bl.

Alternatively, we would suggest you either create a new class library and start adding files until you are able to trigger the issue and provide a minimal repro.

@javiercn javiercn added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Mar 26, 2025
@rbuergi
Copy link
Author

rbuergi commented Mar 27, 2025

@javiercn I am sorry I didn't understand. I have now produced the binlog for the pack process. It took me a while, I didn't even know this exists.

I guess this is what I need to do? If not, I am sorry. I know now how to produce this on github, so can also add the one for build.

Thanks a lot for taking care.

msbuild-binlog.zip

@dotnet-policy-service dotnet-policy-service bot added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Mar 27, 2025
@danroth27 danroth27 added area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages and removed area-blazor Includes: Blazor, Razor Components labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update.
Projects
None yet
Development

No branches or pull requests

3 participants