Solved

Could Not Load File or Assembly:  File Not Found  With Modified Cassini build

Posted on 2010-11-09
9
373 Views
Last Modified: 2012-05-10
Got a solution with three projects (the solution is for a client application).  One project references Cassini from the assembly in Windows\assembly.   I have obtained the Cassini source and modified it.  Compiled it into a dll.  I then removed the reference from the one project and add the reference back in but this time pointing to my "custom" cassini.dll build.  I chose the option to copy local.

I can compile the solution without any problems and in the /bin folder of the primary project I see all the files including the new version of the cassini dll that I just pointed.  However, ever time I go to run the final app I get an error that it cannot load the cassini assembly or file because it can find the file specified.  I've cleaned each project and rebuilt as well as cleaned the solution and rebuilt.

What the heck could I be doing wrong.  I've never had this much difficulty including a custom dll in my solution.
0
Comment
Question by:davidcahan
9 Comments
 
LVL 5

Expert Comment

by:VincentSG
ID: 34099879
Hi!

I am not sure if this will help you but it happened to me once before. In my case, the "custom dll" was compiled in Debug mode and does not seem to work in Release mode. You can try to compile your cassini code in Release mode and reference to the correct final version.

If it does not work, you can try setting the path to locate the dll. See the example here:
http://msdn.microsoft.com/en-us/library/823z9h8w(v=VS.90).aspx
0
 

Author Comment

by:davidcahan
ID: 34124204
does it help to know that the custom dll is a class library which is being referenced by another class library in the other project which in turn is being referenced by an EXE
0
 
LVL 5

Expert Comment

by:VincentSG
ID: 34170167
Hi! Sorry for the late reply.

Can you open the Project file (.proj) in a text editor to see if the Project Reference is pointing correctly to your custom file? Perhaps it might still be pointing to the assembly in GAC.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:davidcahan
ID: 34174096
No, it's pointing to the custom dll.  I've been reading up on Cassini in the interim and it looks like it might HAVE to be registerd in the GAC to work.
0
 
LVL 17

Expert Comment

by:Zhaolai
ID: 34181873
Please refer to the following link:
http://support.microsoft.com/kb/837908

There are 3 ways to solve the issue. I have used the third method for all my projects and it works well.
0
 
LVL 13

Accepted Solution

by:
Corey2 earned 500 total points
ID: 34181881
use fuselogvw.exe to troubleshoot it.

http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx

It will help you identify exactly why it cannot load the custom dll

If it is signed I would expect that the version that is referenced may not be an exact match.  Or perhaps your new version is unsigned and the assembly that references it is signed.  Anyway if there is a mismatch of some kind or a missing dll the fuselogvw.exe will help point it out.

Corey2
0
 

Author Closing Comment

by:davidcahan
ID: 34184187
The only reason it wasn't complete is the fuslogvw.exe in and of itself cannot resolve the issue -- it can only help determine the issue.  I used fuslogvw.exe and using it (and research I did online), I determined that there is a "bug" in cassini that requires you to either register it in the GAC or put an additional copy of the dll in a bin directory in your web root.  Once I added an additional copy to my bin directory in my web root it worked like a charm.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now