config file path.

  • Thread starter Thread starter farseer
  • Start date Start date
F

farseer

Hi,
i am using the following to return the path to my executable:

Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);

the problem is, this is always return //Program Files/<AppFolder>

It doesn't appear to be driven off where the executable is located, but
rather, what settings you use in VS for Project
Properties->Device->Output path Folder.

so when i am testing/debugging, it is returning the wrong directory,
since my executable is located in /bin/release at that time.

any ideas what is going on here or how to solve?
 
actually, i think i figured out my problem. I am using Visual Studio to
do my development. since i am testing thru an emulator, the file is
actually being copied to the location specified in the Project
properties. the problem is, my config file is not being copied with
the build. how can i make sure that is pushed to the emulator as well?

Also, anyone have any suggestion on how to create a cab file for
distribution? does Visual Studio offer any such things?
 
Haye you tried:
"Build" -> "Build Cab File"?

The output will be in the cab-folder (debug/release) of your project folder.
 
Make sure your config file is in your project, and marked with a BuildAction
property of Content. It will then be copied to the output folder along with
your exe

Peter
 
hi Mikael, i am using VS2005 beta2 and that does not seem to be
available from the Build menu
 
Back
Top