Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > FileNotFoundException on reference assembly after deployment
 

FileNotFoundException on reference assembly after deployment

I have awindows form app. Icreated a Setup wizard project to the solution. But when I run the application from the start menu I get a FileNotFoundException. If I debug the exception I find that it is thrown by the licensing software assembly that I am evaluating.If I start the program from the windows explorer by drilling down to the c:\Program Files\.... the program runs fine.

If I remove the licensing assembly, but leave some Infragistics assemblies, the program starts fine (from the start menu). I have done this with 2 licensing products that I am evaluating and it is happening with both of them.

So, I added one of them to the Assembly cache (it was not in there)and it worked. Does this mean I need to add all of my commercial assemblies to the target GAC?

Thanks!

Bob
Carver42  Wednesday, December 31, 2008 6:19 PM
It depends on the assemblies.

For example, you can deploy DirectX locally without installing it in the GAC (which surprised me).

I would check with Infragistics and ask them if their assemblies have to be installed in the GAC, but from what you're doing here, it would seem that they do.

RobinS. GoldMail.com
  • Marked As Answer byCarver42 Sunday, January 04, 2009 10:41 AM
  •  
RobinDotNet  Wednesday, December 31, 2008 11:58 PM
It depends on the assemblies.

For example, you can deploy DirectX locally without installing it in the GAC (which surprised me).

I would check with Infragistics and ask them if their assemblies have to be installed in the GAC, but from what you're doing here, it would seem that they do.

RobinS. GoldMail.com
  • Marked As Answer byCarver42 Sunday, January 04, 2009 10:41 AM
  •  
RobinDotNet  Wednesday, December 31, 2008 11:58 PM

Hi Carver42,

I am not sure whether the problem is caused by the licensing assembly. But from your description, "If I start the program from the windows explorer by drilling down to the c:\Program Files\.... the program runs fine", I find there is some information missing when you start your application from Start Menu.

Please right click the shortcut to see if the "Start in" parameter is correct. If there is not text in "Start in" field, your application may meet problem. That's why when you start your application by clicking the exe instead of shortcut with no problem.

Hope this canalso help you.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, January 02, 2009 7:50 AM
Robin,

Thanks for the feedback. Just for the record, the Infragistics assembiles work just fine as they always do. It is another company's assemblies that are causing the problem.
Carver42  Friday, January 02, 2009 12:24 PM
Kira,

I have done a few tests since then. When I add the licensing assembly to a GAC Folder in the setup file system, everything works fine. I remove it from the GAC using control panel, and it breaks, I add it again using the control panel and it works again. So I think it needs to be in the GAC.

I was just suprised because all the documentation says don't add add things to the GAC unless you have to.

Then there is the .NET Framework pitch that it eliminates DLL hell, andall youhave to do is be sure the assembly is in the application folder... This doesn't seem to be the case.

Bob
Carver42  Friday, January 02, 2009 12:29 PM

You can use google to search for other answers

Custom Search

More Threads

• DLL Control in IE Windows Form
• ClickOnce - Update
• ClickOnce: Do something before the start of the application
• ClickOnce Identity
• Problem with the install
• Click Once alternative
• Signing the Assembly Manifests
• ClickOnce deployment problem
• What are the steps to sign an app when you have W2K3 with CA installed
• CAB/ActiveX/MSI/Update: File location