in this code, in my addin that I'm attmepting to wrie for Vs2010
_applicationObje开发者_开发知识库ct.ItemOperations.NewFile( "General\\Text File", FileName, Constants.vsViewKindCode );
The first paramter is defined as the virtual location for the file.
http://msdn.microsoft.com/en-us/library/envdte.itemoperations.newfile(v=vs.80).aspx
Is it just a String with the path, starting at the root of my soloution?
If so if I want to put a file in /+".CV", how can i do that?
I read some where to create a file while recoriding a macro, and look at the guts of the macro. that said @"Visual C# Items\Code\Class".
but when I run that is says that template can't be found.
Thanks,
Eric-
I actually used this
DTE.ItemOperations.AddNewItem("General\Text File")
which reformed from what I got from the macro editor and put together this
DTEObj.ItemOperations.AddNewItem(@"Visual C# Items\WPF\User Control (WPF)", filename + ".xaml");
So in your case give this a try
DTEObj.ItemOperations.AddNewItem("General\Text File");
精彩评论