Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Is there an event similar to IVsSccSolution.AddedToSourceControl for remove from source control?

$
0
0

I have referred to the sample at https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/ArchivedSamples/Source_Control_Provider_Status_Bar_Integration to enhance my source control provider with the publish workflow.

With this, my source control provider is listed as one of the options when the Publish/Add to Source Control button is clicked on the status bar.

Once publish is complete, SccProviderService raises the AddedToSourceControl event defined by IVsSccSolution:

public void AddProjectsToSourceControl(ref Hashtable hashUncontrolledProjects, bool addSolutionToSourceControl)
        {
            ...
// Raise the event to inform the shell that the solution was added to Source Control AddedToSourceControl?.Invoke(this, EventArgs.Empty); }

This removes options from the Add to Source Control button on status bar. If I were to additionally implement the other related interfaces like IVsSccCurrentRepository, this button will be replaced with those.

My source control provider gives users a way to remove the solution from source control. But, once I do that and save the solution, theAdd to Source Control button still remains in the same state (that is, no options), or in the case I have implemented IVsSccCurrentRepository, it doesn't switch back to Add to Source Control.

Is there a RemovedFromSourceControl event that I can raise to let the environment know that it should start showing the Add to Source Control status bar button with supported source control providers, just like it would if I were to close and open the solution? Any other way to achieve the same would help too.

Thanks,
Priya



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>