Visual Studio 2010 - Start External Program

837
4
09-01-2011 01:54 PM
ChanceYohman1
New Contributor
ArcGIS Desktop Project, Visual Studio 2010, Multiple Developers, 32-bit and 64-bit machines

I try to Start External Program : %AGSDESKTOPJAVA%\bin\ArcMap.exe (or enclosed in ")

VS says it can't find the application, but I can launch the app from the command line using the above. Has anyone solved this? I want to do this to deal with varying paths on different developers' machine (i.e. Program Files (x86) vs Program Files).

Thanks for your time.
0 Kudos
4 Replies
NeilClemmons
Regular Contributor III
The path is stored as a user-specific setting.  Visual Studio stores this setting in the *.suo file that sits alongside the solution (*.sln) file in your solution directory.  If you're using source control, then this file shouldn't be included when you add the solution to your source control provider.  If you're simply copying the solution down from a server or something, you shouldn't copy this file.  Each developer should have their own *.suo file on their development machine.
0 Kudos
AlexanderGray
Occasional Contributor III
I have never got relative paths to work in the start external program in VS2003, 2005 or 2008.  You need absolute path.  But Neil is right, we keep the .suo as an external file to our source control and everything is ok.  Plus the suo contains other things you usually don't want to share (compile type for example is usually debug on developer machines but could be changed to release.)
0 Kudos
RichardWatson
Frequent Contributor
We have a related problem in that we have developers with 32 bit operating system and developers with 64 bit operating systems.  This creates a problem when referencing files because the file paths are different.  What we do is to use the SysInternals junction command to create the "Program Files (x86)" path on 32 bit machines.  This works for us because we always install to the C drive.

I think that junction, or mklink, are very powerful commands that can be used to solve these types of problems.

If do want to insist on the C drive then another trick we use is to create a logical drive, say X, using the DOS subst command.  This allows the developer to install to any location.
0 Kudos
ChanceYohman1
New Contributor
Except keeping the .suo in the repo is a requirement.
0 Kudos