473,498 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help: DLL run-time problem

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)

Jul 21 '05 #1
3 1462
Hello,

Thanks for your post. As I understand, the problem you are facing is that
you .NET app will always load previous version of a class library at
run-time. Please correct me if there is any misunderstanding. I now share
the following information with you:

1. Please check if you have multiple version of class library (DLL)
existing on your system or even installed in GAC. If so, I suggest you to
rename or delete the older version and see if it works.

2. Did you specify to load early version of DLL in you .NET app's
configure? For more information on "Managing Versions of an Application",
please refer to the following MSDN article:

http://msdn.microsoft.com/vstudio/us...?pull=/library
/en-us/dndotnet/html/managevers.asp

3. In addition, you can use Process Explorer to check which DLL is loaded
to your .NET app. You can get this tool from www.sysinternals.com:

Process Explorer
http://www.sysinternals.com/ntw2k/fr.../procexp.shtml

I look forward to your response.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Thanks for your response.

Unfortunately I have tried all of those things you have suggested. There is only one possible DLL it can be loading. I have found some additional information about this problem that may help further. I have tried to replicate this problem by creating a "Windows Application" to use the DLL. I have found that I cannot replicate the problem using this type of project. The only project I can get this problem to replicate is with an "Excel Project" (Visual Tools For Office). I hope this helps.
Jul 21 '05 #3
Hi,

Is it possible for your to post a sample project and tell me the detailed
steps to reproduce the problem? I will be glad to check it on my side.

I look forward to hearing from you.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4

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

Similar topics

5
13253
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
10
3717
by: salerno.david | last post by:
I want to run a program from the program im writing. For example when my program is running I want it to open up an internet explorer window. I have been searching and found that there is a RUN...
11
2890
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get...
6
2493
by: Lucas Cowald | last post by:
Hi, I need to RUN/execute a Command-Line command from an ASP page. This is the command: sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2 -p Can you show me a code how to run this...
17
2264
by: Saps | last post by:
Hi all. Can anyone help me here. I have loads of .sql files and i need a way to call these from my asp page so the user can run them from the browser. Meaning i have a page with a list of all...
3
4014
by: promiscuoustx | last post by:
I am trying to get my program to compile, but it will not complete. At line 79 it states, cannot convert 'float()()' to 'float' in assignment. Here is my code. #include <iostream> #include...
1
2581
by: skippychalmers | last post by:
Hey... new here. Could really use some help with a preg_split i'm trying to run. Basically, I have a string. In it is the tag: ''. Its a sort of bbcode feature I'm adding to a forum. There's...
1
1977
by: rfranzl | last post by:
Hello, I need some help, I have about 200 databases that are copies of an original database that has a similiar table in all of the databases, called "tblCodebook". What I am trying to do is to...
2
4169
by: =?Utf-8?B?SnJ4dHVzZXIx?= | last post by:
I just started using Windows Live OneCare, I had been using Norton, but was unable to fix the problems I was having. I have yet been unsuccessful with OneCare as well. I keep getting the same...
4
2782
by: sandvet03 | last post by:
I am trying to expand on a earlier program for counting subs and now i am trying to replace substrings within a given string. For example if the main string was "The cat in the hat" i am trying to...
0
7125
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
7002
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
7203
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...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4588
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
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.