By Greg McGuffey - 3/9/2007
I am in the process of reorganizing the application I've been working on, breaking it into multiple assemblies, changing the namespaces, etc. (The app was getting unwieldy, as I didn't know enough initially to organize it). This is a SF app w/security.
In any case, my main app (the win app with sub main), which is a windows application, calls to My.Application are all failing. The error is that "Application is not a member of My". When I type "My.", intellisense only shows Resources.
Any ideas of what might be causing this or how to fix it?
Thanks!
|
By Trent L. Taylor - 3/10/2007
Greg,You are smart to start separating your code into multiple projects. This makes that development, deployment, and managability of your application much easier. I have seen the My.APplication disappear before but the cause is generally from moving code from an application to a class library....but not always. I would have to actually get my hands on teh project to give you a definitive answer. One thing is certain though...pretty much everything given through the My.Application reference can be retrieved a different way.
|
By Greg McGuffey - 3/12/2007
Thanks for the reply Trent. It's probably out of the question to send you the app (NDA would be required, yada yada )
Could you let me know some things to try/look for?
Thanks!
|
By Trent L. Taylor - 3/12/2007
This is kind of liking asking "how long is a string" Which project are you trying to access teh My.Application from? Is it the Application or Class Library?
|
By Greg McGuffey - 3/12/2007
That many ways to fubar a project, huh?
This is the startup project for the solution, it is a win form project. My.Application is being accessed from within the app it refers to (i.e. My.Application calls are in RAMS project and referencing the RAMS project).
The structure is:
- Solution is RAMS
- startup project is RAMS (win forms app) (referencing My.Application here)
- BO library
- security library
- base library (common code, like headers, custom controls, shared classes, etc)
- couple of "module" (i.e. a module of my specific application, in a business sense, not a VB module) libraries
|
By Trent L. Taylor - 3/12/2007
That many ways to fubar a project, huh? Pretty much In regards to your project, do you have any of the other "My" references such as My.Computer? Without getting hands on I am not sure I can give you a very good answer here....sorry
|
By Greg McGuffey - 3/12/2007
I have My.Resources only.
Would you need the entire solution or just the one project? I might be able to send the single project, as it has very little code in it (relative to the entire solution).
|
By Trent L. Taylor - 3/12/2007
Hmmm....well, this indicates that there is a fundamental project setup issue here. Have you tried to create a new project and see if that project contains the My.* references. This might be your safest (and quickest) road back to a working My.* reference.
|
By Greg McGuffey - 3/12/2007
so...
rename the current project
add a new one with correct name
see if my.application (etc) exist
if yes...move files and delete old project
if no...
I'll try that.
|
By Trent L. Taylor - 3/12/2007
LOL...yup, pretty much. Sorry I laughed at your pain It is just that I have been there before.
|
By Greg McGuffey - 3/12/2007
Well, since you're still alive and able to laugh, I'll take hope in that and soldier on!
|
By Greg McGuffey - 3/12/2007
Adding a new project and copying the code over worked Thanks!
|
By Trent L. Taylor - 3/12/2007
I figured it would....it sounded to me like your project was "jacked" Glad you got it going!
|