Skip to main content


Showing posts from November, 2008

Getting the Source Control path of a file - VS SDK

If you are developing VS Packages, here is something you might need to have a look into.

We are obtaining the source control bindings, and local bindings of the window's document, and finds the source control path from that.
public string GetSCPath(EnvDTE.Window window) { EnvDTE.Document doc=window.Document; if (window.DTE.SourceControl.IsItemUnderSCC (window.Document.FullName)) { SourceControlBindings bindings = (window.DTE.SourceControl as EnvDTE80.SourceControl2).GetBindings (window.Project.FullName); string scPath=bindings.ServerBinding + doc.FullName.ToLower().Replace (bindings.LocalBinding.ToLower(),"").Replace ("\\","/"); return scPath; } return null; }

Using a WCF service in your VSPackage

I'm developing a Visual Studio Package that uses a library that consumes a WCF service. Almost obvious, I found that my service proxy can't read the configuration information!!

I just moved the configuration information to to devenv.exe.config in the Visual Studio Common IDE folder where devenv.exe is residing - and well, now my service proxy is good to connect.