Using "Get Latest" from Visual Studio
Moderator: SourceGear
Using "Get Latest" from Visual Studio
We have recently discovered an issue where, when using Visual Studio, if we attempt to "get latest" from the project, we receive the following error during compilation when other users have added new files to the project:
error CS1504: Source file 'file name' could not be opened ('Unspecified error ')
Attempting to open the file in Visual Studio returns the following error:
the file cannot be opened - it may have been moved or deleted.
Attempting to "get latest" directly from the file does not work.
Each of the new files were shelved prior to being checked in.
error CS1504: Source file 'file name' could not be opened ('Unspecified error ')
Attempting to open the file in Visual Studio returns the following error:
the file cannot be opened - it may have been moved or deleted.
Attempting to "get latest" directly from the file does not work.
Each of the new files were shelved prior to being checked in.
Connections Academy Software Development Team
Re: Using "Get Latest" from Visual Studio
Is the file that is causing the error on disk, or is it not being gotten during the Get?
Is the file listed in the project file?
Is the file listed in the project file?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Using "Get Latest" from Visual Studio
I apologize for not responding sooner, I got busy and this fell off my radar.
What happens is this:
A user creates a new file and adds it to the visual studio project, and checks everything in.
Another user does a "get latest"; the project now references the newly added file; and a "shadow" of that file appears in the Visual Studio project explorer, but the file is not loaded from Vault.
In short, the file is not on disk, but is listed in the project.
Thank you.
What happens is this:
A user creates a new file and adds it to the visual studio project, and checks everything in.
Another user does a "get latest"; the project now references the newly added file; and a "shadow" of that file appears in the Visual Studio project explorer, but the file is not loaded from Vault.
In short, the file is not on disk, but is listed in the project.
Thank you.
Re: Using "Get Latest" from Visual Studio
If the user opens their Vault GUI client, can they see the file there?
If you look at the project file on disk, does it list that file?
If you look at the project file on disk, does it list that file?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Using "Get Latest" from Visual Studio
Yes, the file is in Vault; the user has to manually get latest directly from Vault; right clicking on the file's shadow in Visual Studio's project explorer doesn't seem to work for some users (others are able to do this).
If we look at the file directory where the file should physically be located, it is not there until we manually get the file from Vault's GUI.
Thank you.
If we look at the file directory where the file should physically be located, it is not there until we manually get the file from Vault's GUI.
Thank you.
Connections Academy Software Development Team
Re: Using "Get Latest" from Visual Studio
It sounds like maybe the file isn't listed in your project file. Can you open the project file (.vbproj or .csproj or something similar to that) in notepad and see if the new file is listed? Specifically I want you to look at the project file that is on the disk of the user that can't get the file. Is the file that looks ghosted listed there?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Using "Get Latest" from Visual Studio
The person that reported this issue wasn't sure, because he has already gotten the files from Vault. He told me he'd let me know as soon as this happens again.
I would think that if it wasn't in the project file, the "ghosted" files would not appear in the project explorer; since the users are getting the latest version of the project file that someone else updated, I can't imagine they woudl be missing from that file.
Really, we would like it if we Vault would automatically get any new files from the repository when a user does a "get latest" of the project.
Thank you.
I would think that if it wasn't in the project file, the "ghosted" files would not appear in the project explorer; since the users are getting the latest version of the project file that someone else updated, I can't imagine they woudl be missing from that file.
Really, we would like it if we Vault would automatically get any new files from the repository when a user does a "get latest" of the project.
Thank you.
Connections Academy Software Development Team
Re: Using "Get Latest" from Visual Studio
I can put in a feature request for automatically getting new files.
Have your users perform a Get at ether the project level or at the solution file level. The .proj file needs to be updated too when new files are added. Does the behavior chance if your users do that?
Have your users perform a Get at ether the project level or at the solution file level. The .proj file needs to be updated too when new files are added. Does the behavior chance if your users do that?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Using "Get Latest" from Visual Studio
No, when doing a get latest from the project or from the solution file we will retrieve the latest versions of all existing, non-checked out files; but files created by others are not retrieved unless we manually do a get latest for each specific file. That is, if one of my co-workers add three files to a project I'm working on; when I get latest for that project, it won't compile untill I right click on each of the "ghosted" files in the project explorer, and click "get latest". I'd have to do that for each new file.
Thank you for your help.
Thank you for your help.
Connections Academy Software Development Team
Re: Using "Get Latest" from Visual Studio
Can you tell me which version of Visual Studio you are using, which version of Vault, and what client is selected in the VS Tools - Options - Source Control - Plugins?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support