PDA

View Full Version : Increment version for smart device projects fails


tfaust
07-19-2004, 10:37 AM
Hi,
I have a solution with mixed .NET and CF.NET projects. On the build step I have the option to set the version number to a specific version befiore building. It will fail if I have either the file or product version checked, having the assembly version checked only works out as it just updates the 'AssemblyVersion'.

The root of the problem is that Visual Build is adding the 'AssemblyFileVersionAttribute' in the AssemblyInfo.cs files, but this class is not supported in the compact framework. Is there some way to make it not set this for smart device projects (*.csdproj) without having seperate solutions?

Thanks in advance!

kinook
07-19-2004, 11:20 AM
Not currently. You could use the method mentioned in the help to exclude some projects from versioning (rename that project's AssemblyInfo file [i.e., AssemblyInfox.cs]). Then you would need to manually set the assembly version attribute for the excluded projects, which could be done via a Replace in File action. Or use a separate solution for the CF projects.

Another option is to not update/increment the File version attribute for the entire solution (and remove any existing file version attributes from existing projects), since VS.NET will set the file and/or product version values in the executable to the assembly version if they are not specified.