Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-07-14
6
Medium Priority
?
157 Views
Last Modified: 2013-11-26
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
Comment
Question by:RichardRiga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 24859544
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
 
LVL 1

Author Comment

by:RichardRiga
ID: 24897415
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24898140
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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 1

Author Comment

by:RichardRiga
ID: 24899238
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24899338
"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
 
LVL 1

Author Closing Comment

by:RichardRiga
ID: 31603474
got what you said now.  i'm slow.  thanks
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question