473,434 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

General VS.NET structure question

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(EXCEPTIONMANAGEME NT_CONFIG_SECTION) ==
null)

is always true.

So I guess my second question is: has anyone gotten a custom publisher to
work with a service?
Nov 20 '05 #1
4 2624

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
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?
Nov 20 '05 #2
Jeff,
Not sure about the custom publisher stuff.

Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).

Be certain to put the custom publisher information in the app.config in your
project, as any app.config else where will be overwritten.

Hope this helps
Jay

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:uo**************@TK2MSFTNGP11.phx.gbl...

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
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?

Nov 20 '05 #3

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:eo**************@TK2MSFTNGP09.phx.gbl...
You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).


Yeah, that was it. I was trying to do the IDE's job for it.... Many thanks.
Nov 20 '05 #4
Jeff,
Pardon the crosspost, but I couldn't find a generic .NET group for VS.NET.


There's microsoft.public.vsnet.general

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ross Micheals | last post by:
All I have some general .NET questions that I'm looking for some help with. Some of these questions (like the first) are ones that I've seen various conflicting information on, or questions that...
1
by: Sean W. Quinn | last post by:
Hey folks, I have a question regarding file handling, and the preservation of class structure. I have a class (and I will post snippets of code later in the post) with both primitive data...
4
by: SK | last post by:
Hey folks, I have some questions. Could someone please answer them for me. Problem background - I am parsing a text file. I need to find the number of times an expression occured in the file....
13
by: gmccallum | last post by:
General Info: A struct is stored on the stack and a class on the heap. A struct is a value type while a class is a reference type. Question: What if a struct contains a string...
14
by: Mr Newbie | last post by:
I am often in the situation where I want to act on the result of a function, but a simple boolean is not enough. For example, I may have a function called isAuthorised ( User, Action ) as ?????...
11
by: dhan | last post by:
please give answer
4
by: Viviana Vc | last post by:
Hi all, I've read the WindowsVistaUACDevReqs.doc documentation and I have done different small tests on Vista to understand the bahaviour and now I have a few questions. 1) If I create a...
2
by: sharan | last post by:
Hello Friends I have a problem in Data Structure (In C) i want to emplement a General tree having three child nodes of each parent node ...please send me any simple Example( code) by which i can...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.