Get Latest (recursive) via Visual Studio 2012

If you are having a problem using Vault, post a message here.
Post Reply
elimisel
Posts: 4
Joined: Fri Dec 21, 2012 6:59 am

Get Latest (recursive) via Visual Studio 2012

Post by elimisel » Mon Jan 07, 2013 7:53 am

We have been testing SourceVault in our environment for a few weeks and it's going great! We have 5 days left on our trial license and are about to purchase, but have one little issue we would like to get some info about before moving forward.

In Visual Studio 2012, if we get latest on a folder, it does not get files recursively. For example, user A creates a new file and checks it in to the repository. User B does a get latest on the root folder in Visual Studio and the file does not get pulled locally. We have every executable running as admin (SV and VS) and permissions are set correctly on the folder structures. We have also set the global recursive setting in our source control options in Visual Studio 2012. However, if we open up the Vault Client and get latest on the root folder from the repository, the files will get pulled to the local machine. We are pretty tied to SV at this point, so we will be purchasing licenses regardless, but if we could find out if this is a bug or just a configuration setting we are missing, it would be great.

Thanks in advance!

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get Latest (recursive) via Visual Studio 2012

Post by lbauer » Mon Jan 07, 2013 11:20 am

Here's a possible cause:

When the user adds a file, Visual Studio should update the project file as well. Is the user who adds the file checking in the project file along with the added file?

The project file maintains a list of files in the project. If the project file isn't checked in, the next user who does a get doesn't have the latest version of the project file, and Visual Studio doesn't know about the new file.

Meanwhile, we'll try to reproduce the problem.
Linda Bauer
SourceGear
Technical Support Manager

elimisel
Posts: 4
Joined: Fri Dec 21, 2012 6:59 am

Re: Get Latest (recursive) via Visual Studio 2012

Post by elimisel » Tue Jan 08, 2013 1:11 pm

That makes sense. Our environment is somewhat unique in that we treat our web apps as a file based system, so we just open the physical files and folders rather than a solution or project file. In VSS this worked ok as we have never had solution or project files in our source control.

Do you think this may be something that will be added into the future possibly?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get Latest (recursive) via Visual Studio 2012

Post by lbauer » Wed Jan 09, 2013 4:52 pm

Are you using Vault Enhanced Client integration with Visual Studio?

If so, maybe the Classic Client would work better for you.

You would need to unbind your project from the Enhanced Client and rebind it to the Classic Client. The Classic Client is similar to what VSS uses for Visual Studio integration.

Here are details on rebinding:

http://support.sourcegear.com/viewtopic ... 375#p68375
Linda Bauer
SourceGear
Technical Support Manager

Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Re: Get Latest (recursive) via Visual Studio 2012

Post by Chiramisu » Wed Jun 26, 2013 12:18 pm

lbauer wrote:The project file maintains a list of files in the project. If the project file isn't checked in, the next user who does a get doesn't have the latest version of the project file, and Visual Studio doesn't know about the new file.
Hello Linda,

I have noticed this issue as well and it has come up again recently. In my opinion this is a design flaw in Vault and the VS plugin. There is always that a developer may forget to check-in the project file or even think it unnecessary, moreover it may be contrary to IT policy as the project file also contains other path specific mappings which may not be relevant between developers and could cause other issues.

Suggested changes:
As a developer on a team, since a working directory must be established to work on files in the repository, I would recommend that files not sync solely based on the project file, but also on the physical presence/absence of the files in the working directory. This way, if a file is declared in the project file but physically missing it will produce an alert/error, and likewise when the contrary is true it will still download ALL files from the repository which are mapped to the working directory. The developer should then be alerted to the presence of the new file at which time he/she may decide what to do with it.

Also, correct me if wrong, but as I understand it project files are considered unmergeable by default. If this is the case the my above suggestion is particularly important since it would be an all or nothing overwrite of your local project file.

A minor correction, it's actually the project file (vbproj, csproj, etc.) which contains the file mappings and declarations.

Best regards,
Matthew

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get Latest (recursive) via Visual Studio 2012

Post by lbauer » Thu Jun 27, 2013 7:16 am

Thanks for your comments.
if a file is declared in the project file but physically missing it will produce an alert/error, and likewise when the contrary is true it will still download ALL files from the repository which are mapped to the working directory.
I'll log a feature request to look into this. Some of the Visual Studio/Vault integration behavior is determined by Visual Studio, so we may be limited in what changes we can make.

However, if a file is is listed in the project file but not in the working folder, you should see the status in Solution Explorer. It's possible that this doesn't work in all project types, so if you can tell us what type of project you have, we can test it here.
as I understand it project files are considered unmergeable by default
That's correct. The default can be changed by adding the file extension (*.csproj, etc) to the list of mergeable files in the Vault Admin Web Client, under Repositories ->(Repository Name) -> File Types.
You do not have the required permissions to view the files attached to this post.
Linda Bauer
SourceGear
Technical Support Manager

Chiramisu
Posts: 38
Joined: Tue Oct 23, 2012 12:13 pm
Location: Oregon

Re: Get Latest (recursive) via Visual Studio 2012

Post by Chiramisu » Tue Jul 30, 2013 12:56 pm

Hello Laura,

I'm sorry for such a late reply, it's amazing how quickly I can become inundated with projects.

Nearly all of our projects are VB.NET with a few C#.NET and we have an assortment of projects between VS2008 and VS2010. In this particular case I believe it was a VS2008 project.

I think the behavior displayed in your screenshot would be great, but I have observed that the icon indicating a missing file seems to only appear when the project file has been updated properly which has not been happening for whatever reason. I can help you test further if you like, just let me know what you need. I'll provide specific details in the future as I notice this issue arise.

Best regards,
Matthew

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get Latest (recursive) via Visual Studio 2012

Post by lbauer » Wed Jul 31, 2013 11:49 am

>>the missing file seems to only appear when the project file has been updated properly which has not been happening for whatever reason.>>

Is the project file not updating due to a Vault problem, or because of user preference?
Linda Bauer
SourceGear
Technical Support Manager

Post Reply