Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2005

Tip: Looking for answers? Try searching our database.

Unable to Get Assertions to Fail Properly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tyrant Mikey - 24 Aug 2005 17:47 GMT
I have a .Net Web application that references several .NET class
libraries. All the code is written in Visual Basic .NET. The code
contains lots of assertions, and I'd *really* like to get them working.
However, they're just not failing!

My problem arises in functions like this one:

Public Shared Function Exists(ByVal key As UserKey) As Boolean

   Debug.Assert(Not key Is Nothing)

End Function

The assertions aren't creating dialog boxes that halt the application
like I expect them to. This is true for all of my methods. To be
certain, I added this to the first executable line of code in the
startup project:

Debug.Assert(False)

The assertion had no effect on the execution of the application.

There's no way I can believe that the code is that solid.

According to the documentation, you have to add this section to the
configuration file:

<configuration>
   <system.diagnostics>
      <assert assertuienabled="true" />
   </system.diagnostics>
</configuration>

So I did that. Still nothing. I am really frustrated here. THe
documentation is vague at best, and the information you need to get
your application to use them correctly is scattered all over the place.
I *still* don't know what happens to the assertions in a class
library. Does a class library need its own configuration file in
addition to the one provided by the hosting application?

Any help you folks could provide would be greatly appreciated.
Anyway, I could really use some help here. If anyone can suggest some
things to look at to help with this, I'd really appreciate it. I have a
beta test coming up really quickly, and I'd like to get the code
Tyrant Mikey - 24 Aug 2005 17:53 GMT
Just did some more fact-finding: trace messages ARE appearing in the
output window, so the assertions ARE failing. I just can't seem to get
the stupid dialog box to pop up.

HELP!!!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.