General VS.NET structure question

23/09/2003 - 03:14 por Jeff Johnson [MVP: VB] | Informe spam
Pardon the crosspost, but I couldn't find a generic .NET group for VS.NET.

I was wondering about the directory structure that the IDE creates when
making a project. What's the point of the bin and obj subfolders? I ask for
two reasons. One, knowledge is a good thing and I'd just like to know. Two,
I'm writing a service and I'm using the ExceptionPublisher Application
block, but I can't seem to get my custom publisher to work. I thought it was
because I had my App.config file in the top-level folder instead of in the
bin folder where the program was actually executing. However, moving the
file there (and no, I didn't actually name it "App.config") didn't work
either.

When I say "didn't work," what I mean is that the ExceptionManager class
doesn't find the ConfigSettings block in the file. I followed the directions
from the help file to the letter but this line:

if (ConfigurationSettings.GetConfig(EXCEPTIONMANAGEMENT_CONFIG_SECTION) =null)

is always true.

So I guess my second question is: has anyone gotten a custom publisher to
work with a service?
 

Leer las respuestas

#1 Jeff Johnson [MVP: VB]
23/09/2003 - 16:23 | Informe spam
"Jeff Johnson [MVP: VB]" wrote in message
news:elsKE$

So I guess my second question is: has anyone gotten a custom publisher to
work with a service?



Okay, experiment and learn. It seems that every time I build my solution, my
<App>.config is wiped out of the bin folder. So I try to figure out why it's
not going into the folder with all the other items in my project. I hit on
the build action property and read about it. Hmmm, perhaps I should set it
to Content instead of None? I have two text files in the project whose build
action in Content and they're getting put in the bin folder, so, along with
the infomation in MSDN, I figure this will solve the problem. Bzzzzztt!! My
<App>.config file STILL isn't copied to the bin folder. I can copy it there
manually and my custom publisher works just fine (I got my exceptions via
email!), but I'd still like to know what I need to do to make this file an
"integral" part of my app.

Before sending this, I took a look at my project's properties, and under
Configuration Properties | Deployment I found a dropdown for an override
file! My <App>.config file was available in the dropdown, so I selected it
and rebuilt the project. This has to work, right? Nope

Help?

Preguntas similares