views:

346

answers:

3

We are using Visual Studio 2008 to develop a winforms application stored in Visual Source Safe 2005.

If one of our team members changes a *.Designer.cs file without changing the form's source file the change doesn't appear during a "Get" operation. However, if in Visual Studio you run a compare on the *.Designer.cs file the differences are displayed in the difference viewer.

FYI: We are using the default Microsoft Visual SourceSafe plug in for Visual Studio.

Any ideas why the "Get" operation will not detect changes in the *.Designer.cs files and suggest we pull down the latest version?

Thanks for your help!

+3  A: 

Designer files are not intended for manual manipulation. One of the chief incentives for adding partial classes to the popular .Net languages was to segregate the designer-generated code from manual user code, in fact. Manual manipulation of repeatedly-generated code (in pretty much any environment, not just visual studio) is asking for headaches.

What changes are you making to the designer file, and why is it not possible to make those changes to the non-designer source file?

Edit:

Is the project in the IDE properly bound and connected to the source control database (via File->Source Control->Change Source Control)? It should automatically be checking out the designer files when changes are made in the designer view.

Greg D
We are only changing the designer files through the IDE's visual designer. In our case we're changing properties of visual components (i.e., Text, Font, etc.).
A: 

Woe unto you for having to use SourceSafe. At my last job, we used SourceSafe and had a myriad of problems with it. We switched over to Surround SCM and were really happy with it. I'd never heard of it before that job.

To answer your question, any time I ran into a problem like this with SS, I'd do a "forced get": in the options dialog when you get latest, tell SourceSafe to get the latest version from the server regardless of whether it thinks the file is up to date.

Edit: I think the issue is the VS200X plugin for VSS. If you have the VSS standalone application you should be able to do a forced get from there. I now remember having to do this so often that I stopped using the VS200X plugin.

jcollum
Are you sure there is a "forced get" option? I've never seen it, even when pressing Shift while clicking "Get latest version..." (I'm trying in VSS 2005.)
felideon
In our case if we do a "get" on the source file associated to the designer file the correct designer file is pulled down.However, the problem is there is no way for us to tell en mass what designer files have changed; we have to run a compare on all designer files one at a time.
I think you can only do a forced get from within the VSS application, not the VS200x plugin. It's been a year since I touched it, so my memory... Editing my answer...
jcollum
Right, I was talking about the VSS Explorer (standalone app) as well. I don't see that option. Get latest version just gets the latest version checked in, unless another older file check-in is pinned.
felideon
@Jeff: You can do a recursive Diff, unless that operation takes too long for it to be practical.
felideon
Thanks. The recursive Diff from VSS Explorer does show the differences on the designer files. I had assumed the "Get" operation from the sourcesafe plug in would have behaved the same way but it doesn't appear to show differences in Designer files.
A: 

I would try doing a Get manually through VSS Explorer (i.e. not through Visual Studio) and see if it works. If not, check to see if the file is pinned to a previous version.

felideon