views:

69

answers:

1

I am trying to automate VC++ build via an addIn written using VB.NEt so that we can schedule it using a simple batch file. This addin performs some custom pre-requisites before the build is started. The build is invoked as ...

devenv.com /useenv %NEWSOLFILE% /CLEAN %BUILDCONFIG% /OUT %OUTLOGFILE% > nul

with appropriate filename substitutions. I am facing problem in the following entry-point:-

Public Sub OnConnection(ByVal application As Object, ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, ByRef custom As Array) Implements IDTExtensibility2.OnConnection
        If connectMode = ext_ConnectMode.ext_cm_CommandLine Then
     ' this is always false why??
       End If
End Sub

Here the 'connectMode' is never signalled as 'ext_ConnectMode.ext_cm_CommandLine' though we invoke the build from command line. Is this another nasty MS bug?

Anyone encountered this before? Are there any patches that i need to apply to VS 2005 to fix this? Or are there any simple workarounds?

Thanks in advance,

A: 

Well, i found this on the Internet Frustrations with VS command-line framework

Its a MS Visual Studio bug. Also, a workaround has been outlined for the ones not willing to upgrade / patch.

Abhay