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?

Re: finding executable directory by farseer

farseer
Sun Jul 17 14:24:18 CDT 2005

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?


Re: finding executable directory by Arun

Arun
Mon Jul 18 07:03:06 CDT 2005

Include the config file in your project and set the properties as
content.
VS will automatically put the file in the destination folder onto PPC.

Visual Studio .NET 2003 supports a "Build CAB file" command for
SmartDevice projects (C# .NET and VB .NET) that uses the CabWiz.exe
utility to create CAB files for Windows CE applications. It
automatically
generates the .INF file that is passed to CabWiz.exe so that it can
create the
CAB file, and you can manually edit the .INF file and run the BAT file
to
create customized CAB file.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/netcfdeployment.asp

http://www.codeproject.com/ce/cfinstall.asp

http://www.spbsoftwarehouse.com/products/ezsetup/index.html?en

Hope this helps,
Cheers,
Arun.
www.innasite.com