To change publish version format
I need quick help from U all expert guys. Company will have new SAP system soon and it has limitation of maximum 6 character version number allowable. So need to change publish version style of my C# program from e.g 2.1.2.7 to 2.1.3. I tried a lot to change in publish property, AssemblyInfo.cs but c#(vi开发者_如何学Pythonsual studio ) doesn't allow me to do that. What will be the solution?
http://img33.imageshack.us/img33/254/pulisherr1.png http://img4.imageshack.us/img4/3673/publisherr2.png
My publish version number will be applied to released application files also as shown below picture. I am releasing whole package include folder and setup.exe and application file to our network server from under one folder tagged with latest release number(e.g. Downloader_2_1_2_7). Our SAP system will pick this release number from network.
http://img687.imageshack.us/img687/7069/publisherr3.png http://img692.imageshack.us/img692/8421/publisherr4.png
EDIT 2
At this point my final suggestions are to:
- Write a service (or a scheduled task) to rename the files in question.
- See if you can add a "Post-Publish" MSBuild task and rename the files then (though I'm not sure if publish is part of MSBuild.exe).
- Contact Microsoft directly.
As a disclamer, I'm not sure what the ramifications are of re-naming the files, but it doesn't look like a 3 digit version is natively supported at this point.
Hope you find an answer that works!
EDIT
From what I can tell, the publish version you are trying to modify is for ClickOnce publishing. The version number has to do with the version of the Package that's generated, not with the application version itself.
From what I can tell through viewing the XML of the csproj file, this version number must include the major, minor, build, & revision numbers.
The only resulting artifact of the publish version that I could find is in the file system of the publish location.
As you can see, my file folders are incremented by 1, but I wasn't able to find any reference to 1.0.0.0 - 1.0.0.3 in any of the other files (property windows, etc.)
If your application files are versioned correctly from Assembly.cs, how does this publish version number interfere with your SAP system?
ORIGINAL
This compiles just fine:
Assembly.cs
Properties Window
Not sure how your SAP is integrating with these assemblies, but it should be noted that .Net only uses the AssemblyVersion for referencing. The AssemblyFileVersion is for display only. Source: How to use Assembly Version and Assembly File Version
精彩评论