T
Tyrant Mikey
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
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