LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I perminantly change the VSS working root directory in CVI?

Here's a pet peeve of mine with CVI...
 
When I try and link a project to a Visual Source Safe (VSS) project (Edit Project/Source Safe/Attach), CVI always wants to use the wrong working directory as a base working directory.
 
I want the base directory to be C:\DIR1, and the project to be in C:\DIR1\DIR3. HOWEVER, CVI defaults to C:\DIR1\DIR2\DIR3.
 
The problem is partially VSS. In VSS, my $\ path is supposed to be set to C:\DIR1. It somehow gets set to C:\DIR1\DIR2. If I change it back to C:\DIR1, CVI ends up forcing VSS's  $\ working directory back to C:\DIR1\DIR2.
 
It's a vicious cycle, and I can't seem to break it. Help!
 
- Phillip Conrad
0 Kudos
Message 1 of 7
(5,308 Views)

Hello Phillip,

The first thing to make sure is that the settings in the "Create local project from SourceSafe" dialog is correct.  This dialog appears after you press Attach to link your project to Visual SourceSafe.  After you press attach, you should see a dialog that displays a root folder and any other subfolders you have set up in VSS.  Now, if you select the root directory ($/), what does it say in the textbox entitled "Create a new project in the folder"?  If it says C:\dir1\dir2, then that might explain why the root directory is being reset by CVI.  If it does say C:\dir1\dir2, manually change the text to C:\dir1 then click OK.  On the resulting Source Code Control Options dialog, press OK.  Now, if you press Change (the button that was formally labeled Attach), the same "Create local project from SourceSafe" dialog should appear.  If you click on the root directory, C:\dir should appear in the textbox and the subdirectories should have their correct relative paths.

From here, if you now choose the directory where your project is (for instance the dir3 directory), and click OK.  Does the SourceSafe root directory still get changed?  Or does the correct setting seems to be saved?

 

Thanks

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 7
(5,290 Views)
Wendy,

Thanks for the reply! Unfortunatly, it didn't work.

Here is some background on my system. Maybe it will help pinpoint the error.

I have all of my test program projects (prj) in one big workspace (cws).

(Remember, dir2 = BAD, and dir3 = good)

My process of adding/creating new projects is such:
  1. Create a new project folder in VSS.
  2. Share and branch template .c, .h, and .prj files.
  3. Check out the template files to my working directory. (c:\dir1\dir3)
  4. Edit the new .prj file in a text editor to make it unique. (I edit the paths to the new .c and .h files, change the .exe name.)
  5. Open up CVI 7.1.
  6. Goto "Edit/Workspace..." and add the new .prj to the workspace.
  7. Goto "Edit/Project..." and select "Source Code Control..."
  8. Check the "Use project source code control." checkbox. (This ungreys everything.)
  9. Click the "Attach" button, select "Microsoft Visual Source Safe" from the provider list, and click ok.
  10. The "Create new project in folder..." field reads "C:\dir1\dir2"!!!!!!!
  11. Delete "dir2" from the field, and select the VSS project in the "SourceSafe project to download..." file tree.
  12. "Ok" my way out.
My $/ working directory was set to "C:\dir1". After doing all this, my $/ working directory remained "C:\dir1".

After reading your message, Wendy, I tried doing what you said. I changed "C:\dir1\dir2" (step 10) to "C:\dir1", clicked "Ok", and clicked "Change". The "Create new project" field read "C:\dir1". I followed your suggestion and assigned the project to "C:\dir1\dir3". All was okay... until I tried to create a new project. This project defaulted to "C:\dir1\dir2" again! Argh!

Something interesting...

If I go to "Options/Environment.../Source Code Control", click "Change", select "Microsoft Visual Source Safe" from the provider list, and click ok, "C:\Program Files\National Instruments\CVI71" appears in the "Create new project in folder..." field. If I click "Ok", my $/ working directory in VSS is changed to "C:\Program Files\National Instruments\CVI71". If I delete "C:\Program Files\National Instruments\CVI71" and replace it with "C:\dir1", my $/ goes back to "C:\dir1". If I "Ok" out and then go back in, "C:\Program Files\National Instruments\CVI71" is still shown in the "Create new project in folder..." field. No mention of "C:\dir1\dir2" was found.

I went on a dir2 hunt. I searched the entire drive for files containing a reference to dir2. I also searched the registry for dir2. My .prjs and .cws files are clean of dir2, save for the actual dir2 prj file and cws entries that actually relate to the project that resides in dir2. I don't know where the reference to dir2 is, and thus, I can't kill it.

- Phillip
0 Kudos
Message 3 of 7
(5,286 Views)

Hello Phillip,

Sorry about the delay.  I had to re-image my hard drive so it's taking me a little bit of time to get all my software back on my machine, but enough with my woes ...  So to clarify, when you changed the root directory in CVI, did you see that change mimicked in VSS?  I noticed you mentioned that somehow the setting in VSS was getting changed by CVI.  Can you clarify the behavior you are seeing here?  Also, what version of VSS are you using?

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 7
(5,257 Views)
Wendy,

I don't mind the delay. This problem is a pet peeve and isn't something I can't work around. I would like to get to the bottom of it, though.

To clarify, the only time I see a change in the VSS root directory is when I change something in the VSS controls under the CVI Environmental options. I experimented with it in the last post.

What I'm seeing is CVI being hell-bent on setting a project's working directory to dir1\dir2.

I'm running VSS 6.0d.

Let me try VSS 6 SP6. I'll get back to you...

- Phillip
0 Kudos
Message 5 of 7
(5,247 Views)
I'm using VSS 6.0 SP6.

I tried doing what I did in my second post, but I still received the same "dir2" problem... I'm stumped.

I even used agent ransack to try and track down the location of the problem. I haven't had any luck yet.
0 Kudos
Message 6 of 7
(5,219 Views)

I tried what Wendy L told in his first reply and it is working fine for me

Thanks a lot...

Jay N

Bangalore

Interview Questions

0 Kudos
Message 7 of 7
(4,551 Views)