I noticed that when I build a given C# or VB.NET source to produce a DLL, the binary output is different each time. It would be helpful for our build / de开发者_如何学JAVAployment process if this was not the case. Can I control this?
A timestamp is going to be generated in the file, so you're never going to have complete, bit-for-bit, sameness.
It is probably versioning information in the assemblyinfo file that autoincrement at each build. If you set the version of the assembly manually there should be no difference
The output is going to be different, I don't think you can control that.
You could probably skip the compilation step for a particular project that didn't get changed and copy an earlier version instead. I wouldn;t recommend it, becuase that kind of defeats the purpose of having a build process. A lot of dev teams automatically have the build process increase the version number, even if there were no changes, just to indicate which build generated the dll.
I'm just curious why you want the output to be the same? Perhaps you're fixing a symptom rather than the cause. If you didn't expect any changes to the output, why start the build in the first place?
精彩评论