SourceSafe dsp and dsw files
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: SourceSafe dsp and dsw files

  1. #1
    Join Date
    Jun 2003
    Posts
    53

    SourceSafe dsp and dsw files

    We have just started using SourceSafe to store my Visual C++ projects. There are many programmers sharing the database.

    I know we have to keep the .dsp files under source control, but I am not sure about the .dsw files - do I need to keep these as well?

    An annoying thing that happens though is that I want to use the automatic check-out facility by ticking :-

    "Use read-only flag for files that are not checked out"

    However, when I do this and open Visual Studio, I keep getting prompted to check out the .dsp and .dsw files.

    Why does VS do this? I am not explicitly changing these files? Does VS automatically change them on opening?

    It is good to be prompted when I DO make a change to project settings, but really annoying to have to keep clicking "no" on startup.

    Any idea how to get around this?

  2. #2
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,023
    If the workspace contains a single project it is not required to add the .dsw file in SourceSafe.
    Whenever the .dsw file is missing it is automatically generated selecting
    files of tipes "Projects(.dsp)" in the Open Workspace dialog.
    The probem may change when have more projects in an workspace,
    but just avoid this, and you'll have no more headaches.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  3. #3
    Join Date
    Feb 2004
    Posts
    5
    It's true that you can get away without adding the DSW file to SourceSafe, but you are probably better off keeping it under source control. This is especially true for workspaces with many projects. The project build dependencies are kept in the DSW file and if the project is going to be shared by a development team it will be required in order to keep the build process reliable from one developer to the next. It's kind-of like not putting the makefile under source control, it's a very bad thing.
    You'll find that once you add the DSW files to VSS it will want to change them at first as all the project interdependencies are added and source control links added. But once the workspace is stable you'll find that you almost never have to check it out, unless you are adding projects or changing the dependencies.

    Good Luck!

    John
    nhojmc@hotmail.com

  4. #4
    Join Date
    Jun 2003
    Posts
    53
    Thanks for your help.
    I need to keep both .dsp and .dsw files.
    I am still left with the annoying startup problem though :-

    "Use read-only flag for files that are not checked out"

    When I do this and open Visual Studio, I keep getting prompted to check out the .dsp and .dsw files :-

    "The file is under source code control and has read-only attributes. Do you want to check it out?"

    Why does VS do this? I am not explicitly changing these files? Does VS automatically change them on opening?

    It is good to be prompted when I DO make a change to project settings, but really annoying to have to keep clicking "no" on startup.

    Is there any way to make these files an exception to the "Use read-only flag for files that are not checked out" rule?

  5. #5
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    Sounds like your source control is mucked up. You have to be very careful when adding projects to source safe.

    The dsw is essential to add to source safe because it also contains the source safe paths to each project. This is so that visual studio knows where the projects are.

    I always add projects to source safe from inside of VC++ - I.e. by means of the source safe toolbar.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  6. #6
    Join Date
    Jun 2003
    Posts
    53
    Darwen,
    Thanks, I think that is what has happened.
    When I check out the dsp and dsw files then check them back in, the annoying prompts go away.
    Looking at the .dsp file, the change that has been made is to set up Scc_ProjName and Scc_LocalPath.
    I will need to check this is OK for all my colleagues, but as long as they all use ther same directory structure it should be OK.
    Thanks a million..........Martin

  7. #7
    Join Date
    Oct 2003
    Location
    Romania
    Posts
    127
    Originally posted by darwen
    The dsw is essential to add to source safe because it also contains the source safe paths to each project. This is so that visual studio knows where the projects are.
    Well, there is not so essential because the same info is contained in the DSP file
    (see # PROP Scc_ProjName).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center