Visual Studio Development Bookmark and Share   
 index > Visual Studio Source Control and SourceSafe > Project reload causing errors while adding new files to source control.
 

Project reload causing errors while adding new files to source control.

We are writing a 3rd party source control based on VSIP interface. The scenario includes 2 users working on the same branch and modifying the same project file. When second user tried to add a new item to project, he is prompted to reload the project file to get the changes made by first user. This is done by making a call to IVsPersistHierarchyItem2.ReloadItem method. However, once done we do not get a call to IVsTrackProjectDocumentsEvents2.OnQueryAddFiles method. Hence the second user needs to add the new file again. Please confirm if reload project ignores other changes being made to project file ?
vs
samivs  Monday, October 05, 2009 10:53 AM

Please confirm if reload project ignores other changes being made to project file?

I think so, the SCC will deny the adding queries if the file conflicts with the existing one.  We need to have our mechanism to re-adding the new item, and call it in OnLoadComplete method if the project supports IVsAsynchOpenFromSccProjectEvents.  Such as:

l   Saving the adding item in a container.

l   Empty the container in IVsTrackProjectDocumentsEvents2.OnQueryAddFiles.

l   In IVsAsynchOpenFromSccProjectEvents.OnLoadComplete method, if the container has items, re-adding them.

 

Sincerely,
Wesley


Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Wesley Yao  Wednesday, October 07, 2009 8:30 AM

Please confirm if reload project ignores other changes being made to project file?

I think so, the SCC will deny the adding queries if the file conflicts with the existing one.  We need to have our mechanism to re-adding the new item, and call it in OnLoadComplete method if the project supports IVsAsynchOpenFromSccProjectEvents.  Such as:

l   Saving the adding item in a container.

l   Empty the container in IVsTrackProjectDocumentsEvents2.OnQueryAddFiles.

l   In IVsAsynchOpenFromSccProjectEvents.OnLoadComplete method, if the container has items, re-adding them.

 

Sincerely,
Wesley


Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Wesley Yao  Wednesday, October 07, 2009 8:30 AM

You can use google to search for other answers

Custom Search

More Threads

• Internet connector hangs during offline access...
• Unwanted auto-checkout of all datasets
• Web.config/user.config renamed to x.config.exclude
• Get list of files and their versions at a particular date
• "only one database is supported" problem in VS.NET 2005 and VSS 2005
• unloaded project settings lost when checking out solution from source control
• VSS Online
• VS2005 and VSS6: VS needlessly prompts to check-out solution
• Upgrade VSS from 2005 Beta 2 to 2005 release
• How to change user for Visual Source Safe in Visual Studio 2008?