G
Guest
Hi...
Related to my last post, I made an interesting discovery - you can include
an application config file in your project, but it seems that unless it is
named *exactly* App.config *and* it lives in the root directory of the
project, it won't get processed and turned into a <myappname>.exe.config
file. Is there any way to change that?
To give a little background, I have 3 related apps that want to share some
constants and a few objects and routines. There's not really enough code
there to warrant a separate, shared assembly for it, but I wanted to make
sure that all the projects in the solution were using the same small bit of
code, so I reorganized my solution directory tree so that there's a
subdirectory of shared data files and code that they all reference.
Then each of my projects as an app1.cs, app2.cs, app3.cs living at the root
directory. I made project specific subdirectories for the App.config,
App.ico, and AssemblyInfo.cs files for each of the projects and included
those into their respective projects. Logically, it suits my needs well, but
then I ran into this weird case where VS .Net 2003 throws erroneous missing
assembly errors and now this weird behavior - that an application config file
*has* to live in a specific spot and have a specific name to get processed at
all.
I'd thought that app1\App.config would be okay and that would get built into
app1.exe.config as part of the build process but unfortunately not as far as
I can find.
I find it odd that when you Add New Item and choose Application
Configuration File, the dialog box actually does let you name it something
other than App.config even though that will break the build process.
Thanks
_mark
Related to my last post, I made an interesting discovery - you can include
an application config file in your project, but it seems that unless it is
named *exactly* App.config *and* it lives in the root directory of the
project, it won't get processed and turned into a <myappname>.exe.config
file. Is there any way to change that?
To give a little background, I have 3 related apps that want to share some
constants and a few objects and routines. There's not really enough code
there to warrant a separate, shared assembly for it, but I wanted to make
sure that all the projects in the solution were using the same small bit of
code, so I reorganized my solution directory tree so that there's a
subdirectory of shared data files and code that they all reference.
Then each of my projects as an app1.cs, app2.cs, app3.cs living at the root
directory. I made project specific subdirectories for the App.config,
App.ico, and AssemblyInfo.cs files for each of the projects and included
those into their respective projects. Logically, it suits my needs well, but
then I ran into this weird case where VS .Net 2003 throws erroneous missing
assembly errors and now this weird behavior - that an application config file
*has* to live in a specific spot and have a specific name to get processed at
all.
I'd thought that app1\App.config would be okay and that would get built into
app1.exe.config as part of the build process but unfortunately not as far as
I can find.
I find it odd that when you Add New Item and choose Application
Configuration File, the dialog box actually does let you name it something
other than App.config even though that will break the build process.
Thanks
_mark