H
hayworth
I had some code to build the name of a file:
' Build the name of the XML config file.
g_strFiles.strConfig =
My.Computer.FileSystem.CombinePath(Application.StartupPath,
"\Settings\Config main.xml")
This worked fine in Visual Studio 2003. But now that I updated to
VS2005, it no longer works. The Application.StartupPath apparently
seems OK in the editor (no syntax errors and I'm able to select
StartupPath from the Intellisense pop up menu), however when it goes to
run, I get a runtime error:
"StartupPath is not a member of MyApplication"
Where on earth is it getting "MyApplication" -- I didn't have that
word in my line of code. I have Application but not MyApplication.
Indeed, MyApplicattion won't even bring up the Intellisense.
If I do something slightly different, My.Application., it brings up
Intellisense but doesn't have the StartupPath property. How can I get
it to do what you would intuitively want it to do, and why did it work
in VS2003 but not with vs2005?
' Build the name of the XML config file.
g_strFiles.strConfig =
My.Computer.FileSystem.CombinePath(Application.StartupPath,
"\Settings\Config main.xml")
This worked fine in Visual Studio 2003. But now that I updated to
VS2005, it no longer works. The Application.StartupPath apparently
seems OK in the editor (no syntax errors and I'm able to select
StartupPath from the Intellisense pop up menu), however when it goes to
run, I get a runtime error:
"StartupPath is not a member of MyApplication"
Where on earth is it getting "MyApplication" -- I didn't have that
word in my line of code. I have Application but not MyApplication.
Indeed, MyApplicattion won't even bring up the Intellisense.
If I do something slightly different, My.Application., it brings up
Intellisense but doesn't have the StartupPath property. How can I get
it to do what you would intuitively want it to do, and why did it work
in VS2003 but not with vs2005?