[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