PDA

View Full Version : Version control / project build numbers


kklobe
01-11-2005, 03:57 PM
Hello,

I'm using 5.6b with a VSNet2003 C# solution containing 13 projects, and Perforce 2004.2 for version control. I have a Make VS.NET step that is assigning a build number with the "Set the project version..." option, and I'm trying to make sure that I check in all files that VSBuild updates as a result. Right now, I am checking out AssemblyInfo.cs from all projects prior to the Make, and checking them in after, since VSBuild is clearly updating these files. However, the next time I go into VS.NET and open the solution, the source control is a bit out of whack, indicating that the projects are checked out, when they are not (according to Perforce). Is there a better technique I should be using to automate updating of build numbers?

Thanks,

- Kirk

kevina
01-11-2005, 05:02 PM
We are doing essentially the same thing here: using Visual Studio 2003 and Perforce. The main thing we do differently is to disable Perforce integration with the IDE.

Neither of the Make VS.Net and Perforce actions do anything unusual that could cause the situation you are describing. It sounds like there is a bug in the software integrating Perforce with the Visual Studio .Net IDE. The problem could either be with Microsoft or Perforce code.

How do you ever get it back into sync once it get's confused?

We've heard of other reasons not to use source control integration with the IDE, this sounds like another one.

kklobe
01-11-2005, 05:14 PM
I have to reset the read-only attribute on the files it thinks are checked out, then everything seems to be ok.

VisBuild seems to be modifying more than just the AssemblyInfo.cs files, which is what I want to know. Regardless of the Perforce IDE integration, I need to know what files to process, and was hoping not to have to resort to trial and error to figure it out. Otherwise, I can just switch to search and replace on the AssemblyInfo.cs files.

- Kirk

kinook
01-11-2005, 05:52 PM
The only files that would be modified by the Make VS.NET action are the RC file (C++ projects only) and/or AssemblyInfo file (if any versions or properties are being set/incremented) and the project file (if the base address is being modified), and it will log these changes if they are made.

The read-only attribute of any files opened for editing normally gets set by Perforce during a submit/revert unchanged. You can take a look at the Perforce.bld sample or the VisBuildPro.bld sample in Samples\VisBuildPro to see how we do edit/commit during the build.

kklobe
01-11-2005, 09:01 PM
Originally posted by kinook
The only files that would be modified by the Make VS.NET action are the AssemblyInfo file (if any versions or properties are being set/incremented) and the project file (if the base address is being modified), and it will log these changes if they are made.


Perfect! This is exactly what I needed to know.

Thanks,

- Kirk