Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-09
9
Medium Priority
?
388 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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:
Corey Scheich earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

927 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