Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / February 2005

Tip: Looking for answers? Try searching our database.

Access to DTE (solution and project) object model on command line

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RafaelC - 11 Feb 2005 07:35 GMT
[This has been posted on vstudio.extensibility as well]
Hello,

I have a VS project that has the Configuration type set to Makefile and
basically calls a ToolApp (EXE) I wrote that goes through the project's
sources and calls the compiler/linker, etc.  It all works well when I have
the solution/project opened in VS .NET 2003 IDE, but I would like to make
builds at night, so I call from the command line:

devenv.exe "C:\myproject.sln" /build "Debug" /project "myproject"

My ToolApp gets called correctly, but looks like I'm not able to get a
pointer to DTE anymore (needed to get the solution, project and collection of
files in the project), is there any way to get this when devenv.exe is called
from the command line as above?  This is what I've tried:

hr = CLSIDFromProgID(OLESTR("VisualStudio.DTE"), &clsid);
if (SUCCEEDED(hr))
{
   hr = GetActiveObject(clsid, NULL, &pUnknown);
  // hr is -2147221021 when ran on the command line
   if (SUCCEEDED(hr))
   {       //I don't get in here if ran from the command line
         pUnknown->QueryInterface(__uuidof(EnvDTE::_DTE), (LPVOID*)&gDTE);
...

Please don't tell me I have to parse the .vcproj to get the settings, and
project files...   :-)

thanks in advance
Carlos J. Quintero [.NET MVP] - 11 Feb 2005 12:29 GMT
I have answered in the microsoft.public.vstudio.extensibility group. Please
use crossposting instead of multiposting
(http://www.uwasa.fi/~ts/http/crospost.html).

Signature

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com

> [This has been posted on vstudio.extensibility as well]
> Hello,
[quoted text clipped - 28 lines]
>
> thanks in advance

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.