I get a Exception throught VersionControlOnNonFatalError-Eventhandler with the following Content:
"There is no working folder mapping for C:\SqlWorkspace."
I have indeed that mapping on my machine. Because of this, i wonder whats wrong.
The error is provoked on the line "workspace.PendAdd(pc.LocalItem);" where pc.LocalItem contains "C:\SqlWorkspace\Audits.sql"
Workspace.Folders contains: LocalItem: "C:\SqlWorkspace ServerItem: $/Code/y_Test/SqlHistoryNew Type: Map}"
Why this error, all settings and parameters seems to be ok? Other questions like mine gave me no hints, which could have been useful.
I found the solution. You have to call "Workstation.Current.EnsureUpdateWorkspaceInfoCache()" before any PendAdd / PendDelete / ... call.
The result is: No error and therefore GetPendingChanges() contains your promoted files.
I found the solution on this site: http://social.msdn.microsoft.com/Forums/vstudio/en-US/96a8e35d-1f84-4ac3-8767-e3682dd75e1a/problem-with-pendadd?forum=tfsversioncontrol
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With