Topaz Filer - Email filing software
Addins and running devenv from commandline
Messages   Related Types
This message was discovered on microsoft.public.vsnet.ide.


Tor-Erik Hagen
GOOD ANSWER
Hi!

I'm making an addin that should also work when devenv is building on
the commandline. But I have two major problems:

1)

How do i detect that the devenv is running in commandline mode ?

I thougth checking for connectMode =
ext_ConnectMode.ext_cm_CommandLine in the
Extensibility.IDTExtensibility2.OnConnection event would do the trick,
but the OnConnection event is never raised with the connectMode set to
ext_ConnectMode.ext_cm_CommandLine when i try to build a project from
the commandline using devenv.

2)

How do i output data to the console during the build process when
building with devenv from the commandline ?

When running in IDE mode i use something like this to print to the
build output pane:

oOutputWindow =
applicationObject.Windows.Item(EnvDTE.Constants.vsWindowKindOutput).Object()
oOutputWindowBuildPane =
oOutputWindow.OutputWindowPanes.Item("{1BD8A850-02D1-11D1-BEE7-00A0C913D1F8}")
oOutputWindowBuildPane.OutputString("Hi ..." + vbCrLf)

Anyone got any ideas ?

Tor-Erik

Reply to this message...
Vote that this is a GOOD answer... (1 vote from another user already)
 
 
    
Visual Studio Core Team
GOOD ANSWER
1) This are a couple known issues with add-ins and command line mode. These
will be fixed in a later version of VS .NET.
2) You should be able to use Console.WriteLine(...) to output to the
console.

Craig

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Tor-Erik Hagen" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

")
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer... (2 votes from other users already)
 
 
    
Tor-Erik Hagen
GOOD ANSWER
Basicaly this means that it is no (other) way of discovering if the
addin is running in a devenv that is in commandline mode or IDE mode ?

Or is there some kind of workarounds i can use to get this event
raised ?

The only thing I need is some way to determine if the addin should
operate in IDE mode or commandline mode ... It might be something that
always fails if the addin is in one of the modes or something ?

The console.write worked perfectly!

Tor-Erik

On Mon, 21 Oct 2002 14:59:36 -0700, "Visual Studio Core Team"
<Click here to reveal e-mail address> wrote:

[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer... (1 vote from another user already)
 
 
    
Visual Studio Core Team
GOOD ANSWER
If the add-in is running from command line, you should be able to examine
the DTE.CommandLineArguments property. This property will contain the entire
command line that was passed to VS, including values such as /build,
/project, etc. which indicate that a build is being performed.

Craig, Paul

--

---
This posting is provided "AS IS" with no warranties, and confers no rights.

"Tor-Erik Hagen" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer... (1 vote from another user already)
 
 
 
EnvDTE.Constants
System.Console




Ad
BootFX
Reliable and powerful .NET application framework.
Looking to invest in a major software project? Technical and commercial advice available here.
Other Helpful Sites
MBR 247
Topaz Filer
SharePoint Email Filing
Software Advisory Services
 
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734