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

Addin: Do merge of item programmatically

$
0
0

I use VS 2012 and VS 2010. I have Addin VS.

I want do Merge of a ítem (sql file).

I use the following code, but I get COMException exception.
       


I use the following code, but I get `COMException` exception:

> Command "File.TfsContextExplorerMerge" is not available

My source code mehtod:

public static void DoMerge(DTE2 app)       
{           
if (app.SelectedItems.Count != 1 || app.SelectedItems.Item(1).ProjectItem.FileCount != 1) return;           
var projectItem = app.SelectedItems.Item(1).ProjectItem;           
var proyectoSW = projectItem.ContainingProject;            

string path = projectItem.get_FileNames(1);           
if !(path.ToLower().EndsWith(".sql")) return;           
try           
{               
projectItem.DTE.ExecuteCommand("File.TfsContextExplorerMerge");           
}           
catch (System.Runtime.InteropServices.COMException)           { }       
}
Any suggestions about it?


www.kiquenet.com/profesional



Viewing all articles
Browse latest Browse all 4410

Trending Articles



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