Groups | Blog | Home
all groups > visual studio .net general > july 2004 >

visual studio .net general : Start IDE process and get EnvDTE object?


cwienands NO[at]SPAM gmx.de
7/27/2004 7:58:27 AM
Hello eveybody,

I'm currently implementing an add-in for VS.Net. I usually develop all
my software with unit tests. I already separated all the non-VS.Net
specific code and moved it into a separate DLL. Now I would like to
develop unit tests for the VS.Net specific code. The problem is that
this DLL is hosted by VS.Net and provides the EnvDTE object to the
add-in, the root object for the extensibility model.

Therefore I guess I will have to start an devenv process and somehow
get the EnvDTE object to create and run tests. Does anybody know how
to do that?

Thanks a lot,

Carlos J. Quintero [MVP]
8/2/2004 3:07:20 PM
I am not sure if this will help or not but this .vbs script file creates a
new instance of VS.NET and returns a DTE object. You can tweak it to meet
your needs:

Dim objDTE

' Create a reference to an instance of VS.NET
Set objDTE = CreateObject("VisualStudio.DTE")

' Show its version
MsgBox objDTE.Version

' Tell the IDE not to close when this reference is released, but when the
user closes it
objDTE.UserControl = True

' Make the IDE visible
objDTE.MainWindow.Visible = True


--

Carlos J. Quintero (Visual Developer - .NET MVP)

FAQs, Knowledge Base, Files, Docs, Articles, Utilities, etc. for .NET
addins:
http://groups.yahoo.com/group/vsnetaddin/ (free join)



"Christoph Wienands" <cwienands@gmx.de> escribió en el mensaje
news:f3079e43.0407270658.271c9e46@posting.google.com...
[quoted text, click to view]

AddThis Social Bookmark Button