Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-13-2004, 03:49 PM
jnapier jnapier is online now
Registered User
 
Join Date: 07-29-2003
Posts: 32
Increment Certain Projects

Im using the make vs.net solution and I want increment the version of all the projects in the solution except for one. How can I acheive this?
Reply With Quote
  #2  
Old 02-16-2004, 07:08 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
"For managed projects containing an AssemblyInfo file (Managed C++ .NET, Visual C# and VB.NET projects), the AssemblyFileVersion (file version), AssemblyInformationalVersion (product version), and/or AssemblyVersion attributes in the project's AssemblyInfo file are created or updated."

So if you rename the AssemblyInfo.* file in the project you don't want versions to be incremented on (i.e. AssemblyInfox.*), the action will not update its version fields.
Reply With Quote
  #3  
Old 02-16-2004, 02:41 PM
jnapier jnapier is online now
Registered User
 
Join Date: 07-29-2003
Posts: 32
The thing is that I need a fixed version for this particular project. The project is for some server controls and they must have a fixed version so that client side scripts can be accessed correctly. So how should I go about accomplishing that when the build script runs?

The build action builds the solution,then increments the version, then builds again. I don't see where I can possibly slip the assemblyversion.cs file back into the mix.
Reply With Quote
  #4  
Old 02-16-2004, 02:57 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Permanently rename the AssemblyInfo.cs file for the project whose version should not be changed. With the solution open in the IDE, right-click that project's AssemblyInfo.cs file and Rename.
Reply With Quote
  #5  
Old 02-16-2004, 03:41 PM
jnapier jnapier is online now
Registered User
 
Join Date: 07-29-2003
Posts: 32
I know how to rename a file in vs.net. Thanks for the tutorial though. The problem with permanently renaming the AssemblyInfo.cs file is that when the solution is built, that particular assembly now has a version of 0.0.0.0.

I need to have an assemblyInfo file so that I can insure that the assembly has a fixed version such as 1.0.0.0. By renaming the file, I can no longer make sure that the project has the proper version number.

Do you need more information about the problem I am facing?
Reply With Quote
  #6  
Old 02-16-2004, 04:16 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
VS.NET doesn't care what filename a project's assembly attributes are found in, so I'm not sure why your compiled assembly's version attribute doesn't match the project's version attribute after renaming the AssemblyInfo file.

I did a quick test here:

1) Created a new C# WinForms app in VS.NET 2003
2) Renamed the project's AssemblyInfo.cs file to AssemblyInfox.cs
3) Changed the AssemblyVersion attribute to 1.4.3.2
4) Added an AssemblyFileVersionAttribute attribute and set to 1.2.3.4
5) Built the project

Looking at the compiled executable's File version info resource (either in Explorer or a resource editor), it has the expected version of 1.2.3.4

Looking at the compiled executable's manifest in ILDASM, it has an assembly version of 1.4.3.2.

Do you get different results with a similar test, or am I missing something?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:47 PM.


Copyright © 1999-2023 Kinook Software, Inc.