Similar Threads:
1.How to use a shared app.config file?
.Net 2.0 I have a variety of console applications that run continuiously in
parallel using the file watcher as an event queue. In addition, I have an
ASP.Net website that needs to access the same key/value pairs as the console
apps. I have configured a separate app.config file for each console app and
have a separate web.config file for the web site. To simplify the
configuration, I would like to use a single app.config file that can be
accessed by each application. Is there a simple way to do this?
Thanks,
--
Tim Meagher
2.Using config files other than app.config for different configurations
I have created two configurations. One is called Release-Internal and
one is called Release-External. I also have two config files named
Internal.config and External.config. The difference in the files is
that the server locations included within each file are either the
local internal addresses or the external public addresses. I've set
the "override file" property in the configuration option property page
to be Interal.config for Release-Internal and to External.config for
Release.external. The effect of that seems to be when you build a
deployment package then the correct .config file is deployed as
AppName.exe.config. My problem with that is that I often rebuild a
project without deploying a new MSI file. What I would like to have
happen is that .NET detects that since I'm building the project in
Release-External to use the External.config file to create an
AppName.exe.config file, and vice-versa. However, when building the
projects, .NET will only use App.Config. If there is no file named
App.Config it won't create any file named AppName.exe.config. How are
others getting around this?
Thanks in advance.
Matthew
3.Wiring up an App.Config file - deploying the App.Config file
Hello,
(Is this the proper newsgroup?)
=== Background ===
I am building a solution with two projects.
One project is my data access layer which contains my DataSet as an xsd
file. The XSD file was built by draging tables from the Data Sources pane.
Auto-generated code created the files associated wtih the XSD file (xss,
xsc, cs).
The other project has a reference to the data access layer project and
contains my windows forms.
=== My Goal === (My two questions further down address parts of this goal.)
I want to add an app config file to the solution and have it contain the
connectionstring. I want to be able to edit this App.Config file after
deployment so that I can connect to the desired target database.
=== Question #1 ===
This question is about adding an App.Config file after the XSD file is
already configured:
When I create an XSD file after I add an App.Config file the
connectionString is automatically added to the config file and the XSD is
automatically wired up to the App.Config file.
However, when the XSD file is created first teh XSD and the App.Config file
are independant form one another - no automatic wiring occurs. How can I get
the App.Config file wired up to the XSD file? - I cannot edit any of the
files associated with the XSD file because the code is auto-generated.
#1) How do I add a App.Config file to a data access layer project with an
existing XSD file and have them appropriately wired up to each other?
=== Question #2 ===
This question is about deployment of the application when there is an
App.Config file in the data access layer:
The following test solution scenario illustrates my problem:
I created a test solution where I added a data access layer project (DAL)
and added the App.Config file before building the XSD file. I built the XSD
file by adding a table to the design surface. (the app.config and the xsd
are automatically wired up properly.) Then I added a windows form project
(WinFrmPrj) and add a reference to the DAL and added a form with a
dataGridView and wired it up to display a table of data. I built a Release
version of the project.
Looking at the respective bin\release folder structures I see the following:
DAL\bin\Release
- DAL.dll
- DAL.dll.config
- DAL.pdb
WinFrmPrj\bin\release
- DAL.dll
- DAL.pdb
- WinFrmPrj.exe
- WinFrmPrj.pdb
- WinFrmPrj.vshost.exe
The contents of the second folder "WinFrmPrj\bin\release" is what gets
deployed (as I understand), therefore the config file is not available! So
when I deploy to the target machine I have no config file to edit to target
the application to the desired database.
#2) How do I have the 'DAL.dll.config' or any editable config file available
after deployment so that it can be edited
Thank you for your help.
dbuchanan
4.Add XmlElements to App.config & show changes in Open App.config
I am writing an Add-in in C#.
I would like to add/remove XmlElements from an App.config file (currently
using the System.Xml classes) and show the changes directly in the open
App.config file (App.config document should be marked with *) so that:
- VS does not ask to reload the App.config after I wrote changes to the file
with XmlDocument.Save()
- With Crtl-Z I can undo all the changes
- The App.config file is only saved when the VS user explicitly presses the
Save button
- When the App.config file is closed during add/removing XmlElements and
then opened I can see all the changes.
This all works when I change source code with CodeModel. Is there something
for XML files & VS as well?
Any help really appreciated!!
Thanks, Nils
5.app.dll.config instead of app.exe.config
Hi;
Is there a way for code in my dll to get it's config info from
MyLibrary.dll.config instead of from TheApp.exe.config?
--
thanks - dave
6. Share config between sub web apps
7. Windows Form in Shared Add-in not reading App.config settings
8. How to share an app.config between several applications