Question

I'm writing a check-in policy for Team Foundation Server, and would like to know if there's any way to get the path to the project solution's .sln file with the TFS SDK. Seems like there should be a way, just haven't found it yet--any help would be appreciated.

Was it helpful?

Solution 2

Found what I needed:


// Enumerate the checked pending changes.
PendingChange[] changes = m_pendingCheckin.PendingChanges.CheckedPendingChanges;

foreach ( PendingChange change in changes )
{
    // this contains the full local path to whatever is being checked in
    // can use this to find the solution file
    change.LocalItem;
}

(m_PendingChecking is of IPendingCheckin type)

OTHER TIPS

Which .sln file? A single Team Project may have more than one.

If you want to get the path to the current solution while Visual Studio is running, then you can use the Visual Studio SDK to do that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top