Thursday, March 17, 2011

VS Express Edition - Start external program solution

"As you've noticed, this functionality is not available in Express. This is one of the many places where the IDE has been simplified..." words of Luke Hoban on social.msdn.microsoft.com.

It's not simplyfication, it is just taking away basic functionality and getting money from users. The postbuild event idea is not bad, but will start the application every time and I am not sure about debugging, if you need to attach to a process or it is done automatically. Here comes a solution, you need to edit the .user file of your project: .vcproj.user for C++ or .csproj.user for C#, probably similar for VB.

For C++ find a Configuration and edit|add DebugSettings:


<debugsettings
Command="C:\Program Files\Adobe\FrameMaker7.1\FrameMaker.exe"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine=""
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor="0"
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>


C#:

<project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<propertygroup condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<startaction>Program</startaction>
<startprogram>C:\Program Files\Adobe\FrameMaker7.1\FrameMaker.exe</startprogram>
<startarguments/>
<startworkingdirectory/>
</propertygroup>
</project>



Good luck debugging your libraries with Express edition.

No comments: