DLL hash changes between GIT commits
We have logged this issue on Developer Community, but we haven't received a response for over a month. Here is the ticket https://developercommunity.visualstudio.com/t/Azure-Devops-Build-pipeline-changing-dll/10825451
We have been advised to log it here.
Here are the details:
We have dotnet 8 projects within a solution that is source controlled with Git. We use a build pipeline to build the projects and publish the artifacts. Some of our dll are certified by a laboratory and therefore the dll should not change between build if no change has been made to the dll. Currently the dll changes if a change if made to another dll, which has no relevance to the other dll. I have created a sample solution to demonstrate this - the solution contains 2 projects DLL1 and DLL2.
If I make a change to DLL2 and push the change, the build is triggered, if I compare the previous build artifact, with the new builds artifact and compare the 2 compiled DLL1.dll’s, there hashes differ.
Attached are the compiled DLL1.dll’s between builds and the build log file Build 1.zip
This is the source code for the solution: BuildTester.zip
This is the pipeline we use (just change the file extension to yml): master - build.txt
We use a Windows vmss as the agent pool in the pipeline
Please advise what we can do to ensure that the builds are deterministic, please take note that we have added the recommended settings to the project files and the deterministic flags are set when doing the build.
Note: This seems to be caused by GIT commits. Even if you build the projects via visual studio (dotnet build), the dll's hasshes change between GIT commits.