❔ [Compiler Help] [GitLab CI/CD]
I'm trying to replace some basic strings with important data about the git hash and git branch, and I am able to replace the strings but they are not actually building into the app. I am using gitlab ci/cd to build them for me, and I can see that the output definitely is changing however when I view the dll in my compiler (DnSpy), the strings are not updated.
I am using the official dotnet ci cd file with some modifications.
2 Replies
I want to update these right before compilation because one of the apps is dotnet 7.0 native aot and since it doesn't have reflection, I need a simpler solution
The other app is dotnet framework 4.8.1
Here is my gitlab ci cd file (mostly stripped of comments):
I used cat to verify the file was updated, and it seemed to look fine
I use
envsubst < PWProfiler/AssemblyInfo.cs | sponge PWProfiler/AssemblyInfo.cs
to replace the variable and overwrite it
it basically overwrites this file:
here is the file after cat:
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.