Get Visual Studio to build the same DLL for the same C # source

I noticed that when I create a given C # or VB.NET source to create a DLL, the binary output is different every time. It would be helpful for our build / deployment process if it is not. Can I control this?

+2


a source to share


3 answers


The timestamp will be created in the file, so you will never have complete, bit-bit-bit, sameness.



+4


a source


This is probably the version information in the assemblyinfo file that is automatically activated in every assembly. If you install the build version manually, there should be no difference.



+1


a source


The way out will be different, I don't think you can control it.

You can probably skip the compilation step for a specific project that hasn't changed and copied an earlier version instead. I would not recommend this, because this kind of wins was the purpose of the build process. Many development teams automatically get the build process, incrementing the version number even if there were no changes, just to indicate which assembly created the DLL.

I'm just wondering why you want the result to be the same? You may be correcting the symptom, not the cause. If you didn't expect any changes in the output, why start building in the first place?

0


a source







All Articles