My.Settings is uninitialized when run outside of the VS environment

M

molafish

I am trying to run my application from an external update process, and
when I do so My.Settings is uninitialized and throws an
NullObjectReferenceException when I access it.

I thought it had to do with the working directory being setup
incorrectly (and thus not being able to find the .config file), but
when I run the application from a shortcut with the working directory
properly specified to the bin\Debug\ dir, it still throws the
Exception. I get the exception when I double click on the exe from
that dir (which I think sets the working directory to the user's
desktop). The only time I do not get it is when I run the executable
from within VS using Start with/without debugging.

I know it's possible to have the executable set the working directory
based on the location of the binary, and I may do that anyway, but
that doesn't check with the test I did using the shortcut.

Any ideas?
 
M

molafish

Bump for great justice...

In case I didn't give enough info:
My.Settings is uninitialized from within my main application, when it
is called via another application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top