D
dbuchanan
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
(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