473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

App Settings for assemblies.

I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.

When I try to retrieve a setting using this code:

//Method 1

string s = ConfigurationManager.AppSettings["TestSetting"];

I don't get anything back. But if I use the following code:

//Method 2

Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;

I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.

I have two questions:

1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.

2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?

I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.

Thanks,

Chris
Keywords:
dll
app
settings
reference
intellisense
class library

Oct 2 '06 #1
10 2227
Hi Chris,

I understand that this is a bit confusing at first, because when you use the
Settings Page in the IDE, a namespace ("Properties") and a set of static
classes ("Settings" and "Resources") is created, which you can see in your
project via the Class Viewer.

It is actually much simpler, as each project has its own class, and if you
have a class library, it will load the Properties class from the Settings
file of the application using the Class libary. This way, each application
can have different configured Settings using the same Class Library. The
Settings class has a static Settings member named "Default" which will
return all of the Properties in the configuration file by name. Example:

AppLogFilePath = Properties.Settings.Default.AppLogFilePath;

So, for example, you can create a Class Library, with its own Settings in
the IDE, so that you will have the Intellisense while developing it, and
then create multiple apps with their own Settings (with the same names as
the Class Libary's Settings, and the Class Library will use the app's
Settings.

You can also create Application and User-Specific Settings, and the
User-Specific Settings can be saved back to the user's local Settings file
(located in Documents and Settings/userName/Local Settings/Application
Data).

See http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx for more detailed
information.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
>I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.

When I try to retrieve a setting using this code:

//Method 1

string s = ConfigurationManager.AppSettings["TestSetting"];

I don't get anything back. But if I use the following code:

//Method 2

Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;

I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.

I have two questions:

1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.

2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?

I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.

Thanks,

Chris
Keywords:
dll
app
settings
reference
intellisense
class library

Oct 2 '06 #2
Kevin Spencer wrote:

Thanks, you have cleared up much.
So, for example, you can create a Class Library, with its own Settings in
the IDE, so that you will have the Intellisense while developing it, and
then create multiple apps with their own Settings (with the same names as
the Class Libary's Settings, and the Class Library will use the app's
Settings.
So any settings I add to the Properties page for the class library
project, will ultimately have to be put in the MyApp.Exe.Config file,
correct? What are the best practices for getting these settings into
the config file for the app when you distribute just the class library?
Are there any methods for integrating the settings into the existing
app.config?

Also, what if the host app has a parameter with the same name as one
used by your class library? Are there any recommended ways of naming
your settings to avoid name collisions?
You can also create Application and User-Specific Settings, and the
User-Specific Settings can be saved back to the user's local Settings file
(located in Documents and Settings/userName/Local Settings/Application
Data).
I was wondering where that was!

Thanks again,

Chris

Oct 3 '06 #3
Kevin -

I'm trying to do this in VB.NET and I'm unable to get it working. I've tried
the following variations; the first two show me the proper setting in
IntelliSense, but throw an exception at runtime ("Object reference not set to
an instance of an object."). The third one doesn't compile as DBServerName is
not a recognized member of Default:
sServerName =
My.MySettings.Default.Properties.Item("DBServerNam e").ToString()
sServerName = My.MySettings.Default.Item("DBServerName").ToStrin g()
sServerName = My.MySettings.Default.DBServerName

Is there something more I need to do to expose application settings to the
assemblies?

Thanks in advance.

"Kevin Spencer" wrote:
Hi Chris,

I understand that this is a bit confusing at first, because when you use the
Settings Page in the IDE, a namespace ("Properties") and a set of static
classes ("Settings" and "Resources") is created, which you can see in your
project via the Class Viewer.

It is actually much simpler, as each project has its own class, and if you
have a class library, it will load the Properties class from the Settings
file of the application using the Class libary. This way, each application
can have different configured Settings using the same Class Library. The
Settings class has a static Settings member named "Default" which will
return all of the Properties in the configuration file by name. Example:

AppLogFilePath = Properties.Settings.Default.AppLogFilePath;

So, for example, you can create a Class Library, with its own Settings in
the IDE, so that you will have the Intellisense while developing it, and
then create multiple apps with their own Settings (with the same names as
the Class Libary's Settings, and the Class Library will use the app's
Settings.

You can also create Application and User-Specific Settings, and the
User-Specific Settings can be saved back to the user's local Settings file
(located in Documents and Settings/userName/Local Settings/Application
Data).

See http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx for more detailed
information.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.

When I try to retrieve a setting using this code:

//Method 1

string s = ConfigurationManager.AppSettings["TestSetting"];

I don't get anything back. But if I use the following code:

//Method 2

Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;

I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.

I have two questions:

1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.

2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?

I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.

Thanks,

Chris
Keywords:
dll
app
settings
reference
intellisense
class library


Oct 3 '06 #4
Hi Chris,
So any settings I add to the Properties page for the class library
project, will ultimately have to be put in the MyApp.Exe.Config file,
correct? What are the best practices for getting these settings into
the config file for the app when you distribute just the class library?
Are there any methods for integrating the settings into the existing
app.config?
Yes, sort of. You would add them via the Properties page for your
application, thereby re-creating the exact same class configuration. Don't
edit the app.config file if you do it this way. Besides, it's easier to use
the Properties page. As for the best practices, there are a couple of
suggestions I can make:

1. Define default values in your code for the class library, using a field
initializer. Example:

private string _FileLocation = "\\";
public string FileLocation { get { return _FileLocation; } }

In some cases, a default will make sense. Usually defaults do.
At the least, the field will have a value. If the developer omits the
value in the
project, at least the value will not be null.
If the assembly is kept in the GAC, modifying the machine.config file
might be in order.
2. Good Exception Handling. (nuff said, I think)
3. Good Documentation. Inform the developer of the default and the config
value
necessary to use the field/property.
Also, what if the host app has a parameter with the same name as one
used by your class library? Are there any recommended ways of naming
your settings to avoid name collisions?
Assuming that the developer using the class library has control over his/her
project (a good assumption), that is the developer's job to do. It isn't
likely to build if not! As for recommended naming conventions, I would think
that adding the namespace or class name to the name of the configuration
item might be a good idea, such as "ThisLibray_ConnectionString". Of course,
again, it isn't likely to happen, but I can see that you are a diligent
developer, so, use your own convention, or mine, if you like.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

If the Truth hurts, wear it.


Oct 3 '06 #5
Hi Craig,

I don't use VB, so I'm only familiar with the CLR syntax. However, I can
tell you is a couple of things, I think. First, the Settings class is not a
Collection. Each Setting is a strongly-typed property of the class. Second,
that the Collection is strongly-typed, and you don't need to do any casting
or converting.

You should read the following:
http://msdn2.microsoft.com/en-us/library/bc6ws923.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

If the Truth hurts, wear it.

"Craig" <CraigM@REMOVE_CAPS_AND_INVALIDco.summit.co.us.inv alidwrote in
message news:48**********************************@microsof t.com...
Kevin -

I'm trying to do this in VB.NET and I'm unable to get it working. I've
tried
the following variations; the first two show me the proper setting in
IntelliSense, but throw an exception at runtime ("Object reference not set
to
an instance of an object."). The third one doesn't compile as DBServerName
is
not a recognized member of Default:
sServerName =
My.MySettings.Default.Properties.Item("DBServerNam e").ToString()
sServerName = My.MySettings.Default.Item("DBServerName").ToStrin g()
sServerName = My.MySettings.Default.DBServerName

Is there something more I need to do to expose application settings to the
assemblies?

Thanks in advance.

"Kevin Spencer" wrote:
>Hi Chris,

I understand that this is a bit confusing at first, because when you use
the
Settings Page in the IDE, a namespace ("Properties") and a set of static
classes ("Settings" and "Resources") is created, which you can see in
your
project via the Class Viewer.

It is actually much simpler, as each project has its own class, and if
you
have a class library, it will load the Properties class from the Settings
file of the application using the Class libary. This way, each
application
can have different configured Settings using the same Class Library. The
Settings class has a static Settings member named "Default" which will
return all of the Properties in the configuration file by name. Example:

AppLogFilePath = Properties.Settings.Default.AppLogFilePath;

So, for example, you can create a Class Library, with its own Settings in
the IDE, so that you will have the Intellisense while developing it, and
then create multiple apps with their own Settings (with the same names as
the Class Libary's Settings, and the Class Library will use the app's
Settings.

You can also create Application and User-Specific Settings, and the
User-Specific Settings can be saved back to the user's local Settings
file
(located in Documents and Settings/userName/Local Settings/Application
Data).

See http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx for more
detailed
information.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegr oups.com...
>I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.

When I try to retrieve a setting using this code:

//Method 1

string s = ConfigurationManager.AppSettings["TestSetting"];

I don't get anything back. But if I use the following code:

//Method 2

Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;

I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.

I have two questions:

1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.

2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?

I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.

Thanks,

Chris
Keywords:
dll
app
settings
reference
intellisense
class library



Oct 3 '06 #6
OK. Anyone else care to chime in with some VB.NET tips? I've been beating my
head against the wall for a couple days trying to access app settings from
within assemblies that are in separate projects. I've looked through MSDN and
struck out (so far). This seems like it ought to be a simple matter, but I
sure haven't been able to get the right combination.

Thanks,
Craig.

"Kevin Spencer" wrote:
Hi Craig,

I don't use VB, so I'm only familiar with the CLR syntax. However, I can
tell you is a couple of things, I think. First, the Settings class is not a
Collection. Each Setting is a strongly-typed property of the class. Second,
that the Collection is strongly-typed, and you don't need to do any casting
or converting.

You should read the following:
http://msdn2.microsoft.com/en-us/library/bc6ws923.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

If the Truth hurts, wear it.

"Craig" <CraigM@REMOVE_CAPS_AND_INVALIDco.summit.co.us.inv alidwrote in
message news:48**********************************@microsof t.com...
Kevin -

I'm trying to do this in VB.NET and I'm unable to get it working. I've
tried
the following variations; the first two show me the proper setting in
IntelliSense, but throw an exception at runtime ("Object reference not set
to
an instance of an object."). The third one doesn't compile as DBServerName
is
not a recognized member of Default:
sServerName =
My.MySettings.Default.Properties.Item("DBServerNam e").ToString()
sServerName = My.MySettings.Default.Item("DBServerName").ToStrin g()
sServerName = My.MySettings.Default.DBServerName

Is there something more I need to do to expose application settings to the
assemblies?

Thanks in advance.

"Kevin Spencer" wrote:
Hi Chris,

I understand that this is a bit confusing at first, because when you use
the
Settings Page in the IDE, a namespace ("Properties") and a set of static
classes ("Settings" and "Resources") is created, which you can see in
your
project via the Class Viewer.

It is actually much simpler, as each project has its own class, and if
you
have a class library, it will load the Properties class from the Settings
file of the application using the Class libary. This way, each
application
can have different configured Settings using the same Class Library. The
Settings class has a static Settings member named "Default" which will
return all of the Properties in the configuration file by name. Example:

AppLogFilePath = Properties.Settings.Default.AppLogFilePath;

So, for example, you can create a Class Library, with its own Settings in
the IDE, so that you will have the Intellisense while developing it, and
then create multiple apps with their own Settings (with the same names as
the Class Libary's Settings, and the Class Library will use the app's
Settings.

You can also create Application and User-Specific Settings, and the
User-Specific Settings can be saved back to the user's local Settings
file
(located in Documents and Settings/userName/Local Settings/Application
Data).

See http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx for more
detailed
information.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.

When I try to retrieve a setting using this code:

//Method 1

string s = ConfigurationManager.AppSettings["TestSetting"];

I don't get anything back. But if I use the following code:

//Method 2

Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;

I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.

I have two questions:

1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.

2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?

I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.

Thanks,

Chris
Keywords:
dll
app
settings
reference
intellisense
class library



Oct 3 '06 #7
I figured it out. The app.config file settings can be accessed through the
System.Configuration.ConfigurationManager object.

"Craig" wrote:
OK. Anyone else care to chime in with some VB.NET tips? I've been beating my
head against the wall for a couple days trying to access app settings from
within assemblies that are in separate projects. I've looked through MSDN and
struck out (so far). This seems like it ought to be a simple matter, but I
sure haven't been able to get the right combination.

Thanks,
Craig.

"Kevin Spencer" wrote:
Hi Craig,

I don't use VB, so I'm only familiar with the CLR syntax. However, I can
tell you is a couple of things, I think. First, the Settings class is not a
Collection. Each Setting is a strongly-typed property of the class. Second,
that the Collection is strongly-typed, and you don't need to do any casting
or converting.

You should read the following:
http://msdn2.microsoft.com/en-us/library/bc6ws923.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

If the Truth hurts, wear it.

"Craig" <CraigM@REMOVE_CAPS_AND_INVALIDco.summit.co.us.inv alidwrote in
message news:48**********************************@microsof t.com...
Kevin -
>
I'm trying to do this in VB.NET and I'm unable to get it working. I've
tried
the following variations; the first two show me the proper setting in
IntelliSense, but throw an exception at runtime ("Object reference not set
to
an instance of an object."). The third one doesn't compile as DBServerName
is
not a recognized member of Default:
sServerName =
My.MySettings.Default.Properties.Item("DBServerNam e").ToString()
sServerName = My.MySettings.Default.Item("DBServerName").ToStrin g()
sServerName = My.MySettings.Default.DBServerName
>
Is there something more I need to do to expose application settings to the
assemblies?
>
Thanks in advance.
>
"Kevin Spencer" wrote:
>
>Hi Chris,
>>
>I understand that this is a bit confusing at first, because when you use
>the
>Settings Page in the IDE, a namespace ("Properties") and a set of static
>classes ("Settings" and "Resources") is created, which you can see in
>your
>project via the Class Viewer.
>>
>It is actually much simpler, as each project has its own class, and if
>you
>have a class library, it will load the Properties class from the Settings
>file of the application using the Class libary. This way, each
>application
>can have different configured Settings using the same Class Library. The
>Settings class has a static Settings member named "Default" which will
>return all of the Properties in the configuration file by name. Example:
>>
>AppLogFilePath = Properties.Settings.Default.AppLogFilePath;
>>
>So, for example, you can create a Class Library, with its own Settings in
>the IDE, so that you will have the Intellisense while developing it, and
>then create multiple apps with their own Settings (with the same names as
>the Class Libary's Settings, and the Class Library will use the app's
>Settings.
>>
>You can also create Application and User-Specific Settings, and the
>User-Specific Settings can be saved back to the user's local Settings
>file
>(located in Documents and Settings/userName/Local Settings/Application
>Data).
>>
>See http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx for more
>detailed
>information.
>>
>--
>HTH,
>>
>Kevin Spencer
>Microsoft MVP
>Software Composer
>http://unclechutney.blogspot.com
>>
>A watched clock never boils.
>>
>"Chris Dunaway" <du******@gmail.comwrote in message
>news:11*********************@m73g2000cwd.googlegr oups.com...
>I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.
>
When I try to retrieve a setting using this code:
>
//Method 1
>
string s = ConfigurationManager.AppSettings["TestSetting"];
>
I don't get anything back. But if I use the following code:
>
//Method 2
>
Properties.Settings _settings = new
ThrowAwayCs.Properties.Settings();
s = _settings.TestSetting;
>
I do get the correct value. I like the second method because I get
intellisense for all the settings. The first method seems prone to
error if I have a typo in the code because I will not know about it
until runtime.
>
I have two questions:
>
1. Is this way (method 2) of using the Settings class (which is
defined in Settings.Designer.cs) considered appropriate? It seems to
work fine.
>
2. I would like to use the second method in a class library project
but since the application references the class library, I cannot
reference the app from the class library because of a circular
reference. I would like to have full intellisense for my settings
inside the class libaray. Is this possible?
>
I would appreciate any comments on how others have used Application
Settings from a class library that is referenced by the app.
>
Thanks,
>
Chris
>
>
Keywords:
dll
app
settings
reference
intellisense
class library
>
>>
>>
>>
Oct 3 '06 #8
In microsoft.public.dotnet.languages.csharp Craig <CraigM@remove_caps_and_invalidco.summit.co.us.inv alidwrote:
I figured it out. The app.config file settings can be accessed through the
System.Configuration.ConfigurationManager object.
This is far different than what others have been talking to you about. Too
bad you didn't mention App.Config in the first place. In any event, this only
works directly on the App.Config associated with the executable program (i.e.
Test.exe will use Test.exe.config), and each DLL assembly does not get its
only configuration [I wish there was a simple way to make that work].

--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1
Oct 3 '06 #9
In any event, this only
works directly on the App.Config associated with the executable program
(i.e.
Test.exe will use Test.exe.config), and each DLL assembly does not get its
only configuration [I wish there was a simple way to make that work].
The app.config file is used by all assemblies in the application domain, so
it can be used by any class libraries used by the application.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

If the Truth hurts, wear it.

"Thomas T. Veldhouse" <ve*****@yahoo.comwrote in message
news:ld*****************@textfe.usenetserver.com.. .
In microsoft.public.dotnet.languages.csharp Craig
<CraigM@remove_caps_and_invalidco.summit.co.us.inv alidwrote:
>I figured it out. The app.config file settings can be accessed through
the
System.Configuration.ConfigurationManager object.

This is far different than what others have been talking to you about.
Too
bad you didn't mention App.Config in the first place. In any event, this
only
works directly on the App.Config associated with the executable program
(i.e.
Test.exe will use Test.exe.config), and each DLL assembly does not get its
only configuration [I wish there was a simple way to make that work].

--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1


Oct 4 '06 #10
In microsoft.public.dotnet.languages.csharp Kevin Spencer <uc*@ftc.govwrote:
In any event, this only
>works directly on the App.Config associated with the executable program
(i.e.
Test.exe will use Test.exe.config), and each DLL assembly does not get its
only configuration [I wish there was a simple way to make that work].

The app.config file is used by all assemblies in the application domain, so
it can be used by any class libraries used by the application.
Yes, but there have been many circumstance where I wish an assembly could have
its OWN App.Config. It gets tedious maintaining App.Config files for several
consumers of a given library [assembly].

--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1
Oct 4 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Roger Webb | last post by:
Hey. Is there a way to attach a satellite assembly to a specific programs' App.Config File? I have some assembly functions that get used in multiple programs... each configured in its own way. ...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
1
by: Rolf Molini | last post by:
Hello everybody, I put this in a separate thread because altough it is connected to the localization-problem in my former thread this is a completely different "joke" of the IDE. While waiting...
13
by: Eric Renken | last post by:
I currently use statements like this in my 1.1 code. System.Configuration.ConfigurationSettings.AppSettings I use this in DLLs that are referenced by the application. The application has this...
0
by: tony | last post by:
I need to access items from My.Settings of my application in a class library that is loaded by the application. I believe you are supposed to be able to give the settings class a group name in...
10
by: Chris Dunaway | last post by:
I have an .exe console project and a class library project as part of a solution. The .exe has an App.config file and I have used the Settings page to add some Application level settings. When...
0
by: José Joye | last post by:
Hello, I'm trying to use the VS2005 Settings file so as to get strongly typed settings. I want the following: - Have all my application setting (with application scope) defined centrally in my...
11
by: =?Utf-8?B?cGJjb2Rlcg==?= | last post by:
Hi, I have been asked to create a solution in a single exe - using C# .NET 3.5. I have found that I can us ILMerge to create a single exe of all of my Application assemblies. But my...
3
by: =?Utf-8?B?Sm9u?= | last post by:
Hello, I have tried to use the app.config and settings.cs files to store my data (which I want to be user changeable at runtime). I can write to (what I assume is an object in memory) and it does...
3
by: Bob Altman | last post by:
Hi all, In my VB 2005 project I create a setting called UpgradeRequired with a default value of True, and I include the following code that runs when the project is launched: If...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.