Tuesday, April 5, 2011

VS 2008 WinForms with SourceSafe

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!

From stackoverflow
  • 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.

  • 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.

    felideon : 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.)
    jcollum : 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...
    felideon : 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.
  • 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.

0 comments:

Post a Comment