I am trying to automate and use VSS functionality for an add-in I am currently developing. I use VS2005 and C#.NET as my IDE and programming language.
After I retrieved the VSSItem from source safe I checkedout it. Then I tried to undocheckout this item. What happens is the following:
Undocheckout worked (I run the Source Safe itsel and looked to see if it is undocheckoutted). However, the read-only attribute of the local file specified by VSSItem did not become read-only.
I passed the value SSFlags.VSSFLAG_DELNOREPLACE to iFlags parameter of the VSSItem.Undocheckout method.
Despite that, local file's read-only attribute did not become enabled after a call to undocheckout. However, I see that if from my C# add-in application I checkout a file and then use the VS IDE to undocheckout the file, the file's read-only attribute enable again.
What I am doing wrong? Any help will be much appretiated.
Try using the default flag, VSSFLAG_DELNO for the UndoCheckout operation. By using this flag the read-only attribute will be preserved and the local copy will not be deleted. Read the online docs, available here, for more information.
Try using the default flag, VSSFLAG_DELNO for the UndoCheckout operation. By using this flag the read-only attribute will be preserved and the local copy will not be deleted. Read the online docs, available here, for more information.