I've got a single file (utils.js) which is used by several solutions in my repository. How do I get Visual Studio to see it? Or do I have to manage it using the Vault client directly?
I can see how to add solutions and projects to source control via VS 2005, but not individual files.
Thanks!
Sharing a single file between projects?
Moderator: SourceGear
Do you want to share the file, so that any change in on project is reflected in the copy of the file in another project?
Do do this, use the Vault GUI Client to share the file from ProjectA to ProjectB.
Then do a get latest into your ProjectB working directory. Open ProjectB in Visual Studio. Select the project, and select Add->Existing Item. In the Add Existing Item window, select the file to add to your project. You'll get a message that the same item exists in source control; do you want it to assume that identity? Click yes. This should add the file to your project and also checkout the project file . Checkin the new file and the project file and your file should now be shared in ProjectB.
Do do this, use the Vault GUI Client to share the file from ProjectA to ProjectB.
Then do a get latest into your ProjectB working directory. Open ProjectB in Visual Studio. Select the project, and select Add->Existing Item. In the Add Existing Item window, select the file to add to your project. You'll get a message that the same item exists in source control; do you want it to assume that identity? Click yes. This should add the file to your project and also checkout the project file . Checkin the new file and the project file and your file should now be shared in ProjectB.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
-
- Posts: 39
- Joined: Tue Oct 02, 2007 3:21 am
- Location: Brisbane, Australia
- Contact:
G'day,
If I do the following with Vault 4.0.4 I get an error.
1. With VS2005 solution open.
2. In Vault client application, share a file between project/folders, eg Company.snk.
3. In Vault client application, get latest version to download file to project folder.
4. Return to VS2005 and add file (right click and include in project).
5. Checkin the solution items and recieve an error on the Company.snk file. See Vault output.
Now I can seem to get this error to go away and VS2005 / vault source control marks the file "Add File" in the type column of the commit dialog screen. How do I resolve this?
If I do the following with Vault 4.0.4 I get an error.
1. With VS2005 solution open.
2. In Vault client application, share a file between project/folders, eg Company.snk.
3. In Vault client application, get latest version to download file to project folder.
4. Return to VS2005 and add file (right click and include in project).
5. Checkin the solution items and recieve an error on the Company.snk file. See Vault output.
I didn't get the message you suggest above (aka "Do you want to assume identity" yes/no).Beginning transaction
Item $/Jenasys/SharedComponents/../Company.snk caused the transaction to fail: An item with the same name or object id already exists in the selected folder.
Transaction failed
Now I can seem to get this error to go away and VS2005 / vault source control marks the file "Add File" in the type column of the commit dialog screen. How do I resolve this?
Jamie Clayton
Jenasys Design Pty Ltd (Australia)
Jenasys Design Pty Ltd (Australia)
The instructions in my post were for VS 2003-style integration, which was the only type of integration prior to Vault 4.x.
You may be using the VS 2005 plugin, which behaves differently.
You can remove the Add from the pending change set by selecting the transaction and clicking on the red "undo" arrow above.
You may be using the VS 2005 plugin, which behaves differently.
You can remove the Add from the pending change set by selecting the transaction and clicking on the red "undo" arrow above.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager