tags:

views:

38

answers:

1

We have a project management application written in VB.net. When running this application from a 32-bit machine or from within the Visual Studio IDE on a 64-bit machine, it looks for the correct configuration file (i.e. MyApp.exe.config). However, when running this app from outside the IDE on a 64-bit machine, it looks for MyApp.config and fails to find it.

Obviously I can copy the correct config to the badly named config, but we're at a loss as to why this behavior is occurring in the first place.

This is a windows application written in the 2.0 framework. No web.config file is associated (as I have found some references to a similar issue with web.config files that didn't apply).

Any guidance or suggestions is greatly appreciated.

Edit: I also should note that this is the only application this is occurring on. If I create a new vb.net application using the same libraries we use for config management, it works fine. Also, of some possible relevance, the projects are being built targeting the x86 CPU.

A: 

What I'd do is on 64 bit at install time I'd do CreateHardLink("MyApp.exe.config", "MyApp.config", NULL)

CreateHardLink is P/Invokable.

Joshua
Thanks for the response. I am not looking so much for a workaround as I am for a reason as to why it may be occurring. Suggestions as to what else to check because we're out of ideas. This behavior is abnormal, but I figure there has to be some reason it's happening.
TC Smith