Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

The following problem keeps me from finalizing my project in Visual Basic. I must say that after many days of search, I did not find anything regarding this topic.
Many of you are probably familiar with the CodeDOM compiler available in Visual Studio. Compiling applications with different user-inputed variables can be quite an easy task.
However, this application requires a few strings saved in the project settings tab and accessed via code by using the "My.Settings.<settingname>" syntax. The same stands for My.Resources.
Now, for a Visual Studio compiled application, it's easy, via the Resources or Settings tab, but, if the application I make in Visual Studio is supposed to compile with codedom another application whose code includes My.Settings statement, I can't seem to be able to create it. When compiling it with my application, I get "Settings is not a member of My".

Any solutions? Could anybody enlighten me about this problem? It's most certainly something easy, but I can't seem to find.
Posted

1 solution

The Settings class (like a lot of the other My. items) are generated at compile time.

My is a namespace, you would have to run the Settings class generator, or generate your own Settings class and add it to the My namespace for it to be available. Take a look at your settings code-behind to find out how the compiler generates this class.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900