VS2010 插件的 DTE ItemOperations.NewFile(...)
在此代码中,在我尝试为 Vs2010 编写的插件中,
_applicationObject.ItemOperations.NewFile( "General\\Text File", FileName, Constants.vsViewKindCode );
第一个参数定义为文件的虚拟位置。
http://msdn.microsoft。 com/en-us/library/envdte.itemoperations.newfile(v=vs.80).aspx
它只是一个带有路径的字符串,从我的解决方案的根开始吗?
如果是这样,如果我想将文件放入 /+".CV" 中,我该怎么做?
我读了一些在记录宏时创建文件的位置,并查看了宏的内部结构。 那就是@“Visual C# Items\Code\Class”。
但当我运行时,提示找不到模板。
谢谢,
埃里克-
in this code, in my addin that I'm attmepting to wrie for Vs2010
_applicationObject.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-
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我实际上用过这个
which reformed from what I got from the macro editor and put together this
So in your case give this a try
I actually used this
which reformed from what I got from the macro editor and put together this
So in your case give this a try