Solved

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

Posted on 2010-11-09
9
377 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

789 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