Replace placeholder in index.html with <Version> from csproj at publish while keeping StaticWebAssets fingerprinting #51767
Unanswered
MarkusRodler
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a minimal
Microsoft.NET.Sdk.Webapp with wwwroot/index.html containing a placeholder VERSION. The csproj has 1.0.0.0. I need the placeholder replaced with that Version during dotnet publish (published file should contain the real version) without modifying source files and while keeping ASP.NET Core StaticWebAssets fingerprinting intact. Prefer an MSBuild-based solution (target/item transform) that runs at the correct publish stage and operates on the publish output or a copy. Could you provide a concise MSBuild snippet and note any target ordering pitfalls to ensure fingerprinting still works?Thanks in advance,
Markus
Beta Was this translation helpful? Give feedback.
All reactions