Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

VS 2005 question: Why am I losing my configuration files on build?

Here's the problem.  My configuration files for a web service and several dlls seem to have just vanished after I build the solution.

Now the web service works just fine; however,  I use those config files to change app settings on the fly without having to recompile... but cannot do that here because they no longer exist.  And, man, I need them to exist.


Now, its my understanding that all of the My.settings settings are stored into configuration files named after the DLL or app they are associated with (example: SomeDLL.dll.config).  Its always been that way when I did a regular app.

This web service, though, seems to embed them.

Any help on getting this fixed is greatly appreciated.  An explanation would be nice, too!
0
RichardRiga
Asked:
RichardRiga
  • 3
  • 3
1 Solution
 
Bob LearnedCommented:
How did you add the web.config file?  What type of web site (Web Site or Web Application model)?  You can't define the config files in the same folder where the DLL is created, because that folder is cleared when the assembly is built.  You need to add a web.config file through the designer, and let the compiler copy the file to the output folder for you.
0
 
RichardRigaAuthor Commented:
Its a Web application.  But I guess I just want to know is this problem exclusive to web services?  or does it happen with regular window apps, too?  This is the only project where my config files seem to be sucked up into the dll.
0
 
Bob LearnedCommented:
I saw My.settings setting, which normally suggests a Windows Forms application.  Did you add a web.config file from the Add New Item dialog to the web service root folder?
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
RichardRigaAuthor Commented:
its a multiple project solution.  One project is a web service (and it does have a web.config which shows up).  The other project is a COM+ service with multiple DLLs.  Those DLLs use the my.settings.  On compile they don't have dll.config files generated.  They seem to be embedded.  I want to a) know why and b) stop it so that i have my config files back so end users can config.
0
 
Bob LearnedCommented:
"They seem to be embedded.  I want to a) know why and b) stop it so that i have my config files back so end users can config."

That doesn't make sense, so you will have to figure out how to explain that one better.
0
 
RichardRigaAuthor Commented:
got what you said now.  i'm slow.  thanks
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now