.net - Injecting assembly version numbers at build time -


I assume the assembly version number of the C # project on build time by calling it the MSBuild command line.

Before assembling the assembly version will modify AssemblyInfo.cs. This is almost the problem I want to do that I do not want AssemblyInfo.cs to be changed due to source control problems. I do not want to modify all these AssemplyInfo.cs files and do not want to check every time we build, do not need to.

What should I do "cheese" that changes the assembly edition number after compilation - perhaps using the post after weaving work Whether such a "item" exists in the first place or open source As a retail product? If not, can someone write documents for writing post build weaver work?

Since assembly version is cooked in your assembly at compiled time, assemblyInfo.cs is in the file source control with the existing code.

If your problem is stored in source control because you do not want to file many files, which need to be updated, try it.

You can establish a link in your solution so that all the projects can point to a file, e.g. SharedAssemblyInfo.cs . Here's the page describing this process:

You can use that file to use the SharedAssemblyInfo.cs file, which You already know, and it only needs to check the file back in the source control.

Comments