Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-11-09
9
Medium Priority
?
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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:
Corey2 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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 …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 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