Error trapping missing assembly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jocke B

    #1

    Error trapping missing assembly

    Hi

    I thought that i should try and trap an error if a referenced assembly
    is missing when executing an exe.

    What I have is a client with a textbox and a button. In another
    assembly i have a class (Class1) with one method that returns a
    string.

    The class1-object is declared as a private member of the form class,
    and is instanciated when the button is clicked.

    What I did was that I removed the referenced assembly from the exe's
    catalog, and started the client. That works ok.

    When I press the button I get a System.IO.FileN otFoundExceptio n, which
    seems logical. The problem is that my try - catch in Button_Click will
    not trap this error.

    Does anyone know why?

    /Jocke
Working...