G
Guest
I have a class library (DLL) that I created and have been using for sometime in my various .NET applications. Recently, I have been having problems with what I believe is corruption (or a bug) of the DLL. The problem goes something like this:
- I add new classes, methods, types, etc to the class library DLL and compile. The compile completes successfully with no errors or warnings
- In the app that references this dll, I can use the new types I have defined in the class library dll (the new types appear in the intellisense list and in the object browser). It compiles fine with no errors or warnings
- However, when I run the app that references the dll, it will generate an exception that says that it cannot find or load the particular class/method/type that I am using, even though it did not find any problems at compile time. When debugging the code I have noticed two things
1. the exception/error does not get caught by any exception handlers I have adde
2. I am prevented from "Stepping Into" the method containing the call to the supposedly missing typ
- I can however use classes/methods/types that were defined prior to the new additions
- I have found a way for the app to recognise the new types at run-time. It involves creating a new solution and importing the code from the old app into the new solution. This will solve the problem, however I will have to do this every time I want to make a change to the class library DL
What I have tried
- Removing the reference and adding it back i
- Deleting the DLL and recompiling source cod
- Turning "Option Strict" ON and OF
- I have NOT tried to re-create the class library DLL (as a new solution) as another bug prevents me from doing so (Currently being looked at by Microsoft and is not (unlikely?) related to this problem)
- I add new classes, methods, types, etc to the class library DLL and compile. The compile completes successfully with no errors or warnings
- In the app that references this dll, I can use the new types I have defined in the class library dll (the new types appear in the intellisense list and in the object browser). It compiles fine with no errors or warnings
- However, when I run the app that references the dll, it will generate an exception that says that it cannot find or load the particular class/method/type that I am using, even though it did not find any problems at compile time. When debugging the code I have noticed two things
1. the exception/error does not get caught by any exception handlers I have adde
2. I am prevented from "Stepping Into" the method containing the call to the supposedly missing typ
- I can however use classes/methods/types that were defined prior to the new additions
- I have found a way for the app to recognise the new types at run-time. It involves creating a new solution and importing the code from the old app into the new solution. This will solve the problem, however I will have to do this every time I want to make a change to the class library DL
What I have tried
- Removing the reference and adding it back i
- Deleting the DLL and recompiling source cod
- Turning "Option Strict" ON and OF
- I have NOT tried to re-create the class library DLL (as a new solution) as another bug prevents me from doing so (Currently being looked at by Microsoft and is not (unlikely?) related to this problem)