Solved

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

Posted on 2010-11-09
9
380 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
Technology Partners: 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 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

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!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

762 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