Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Application requires assembly installed in GAC first
 

Application requires assembly installed in GAC first

I have searched the forums for a few days now, and I've yet to find a solution to this problem that works for me.

The issue that I'm experiencing is that a program published using ClickOnce deployment within
Visual Studio (Visual Studio 2K5 Team Edition in C#) does not install on other user's computers, but it works fine on the development box.

There is a reference to Interop.Excel (Excel Object 9.0 Object Library), which is used for the creation and manipulation of Excel files within a Windows Form application. There is a
"using Excel;" statement to reference this library. Once again, it works on my development box, but I receive an error message when the user's attempt to install it on their boxes. Running it on my box is the only way I can get it to work as well ... I receive an error message stating:

"Unable to install or run the application. The application requires that assembly office Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first ..."

The users receive a similar message, except that it states that they are missing "stdole Version 7.0.3300.0..."

I ensured that all of the references are set to Publish Status = Auto (Include), because I noticed this seemed to be a solution posted on a few threads (copy to target box rather than rely on them being installed in GAC), but it did not remedy the situation.

If anyone would offer up another suggestion of what I am doing wrong here, I'd be very appreciative. Thanks in advance.
Firestorm353  Thursday, September 21, 2006 5:04 PM

Adding stdole as a dotnet referenceshould help. Make sure you distribute this dll as well (required).

Verne  Wednesday, October 11, 2006 10:34 AM

I was having same problem. Then I went to project properties, references, and clicked unused references and then remove all.

g8rpal  Friday, December 28, 2007 6:43 PM
I got the same problem with VS2008. After many trials, I removed unused references as you said but also force "include" on the configuration of the "application files" (button in Project Properties/Publish/). On the "prerequisites" setting, I also checked the radio button for "Downlad prerequisites from the same location as my application". Which one of all those worked, I don't know, but hey! It finaly works!

  • Proposed As Answer byMagnus Burk Friday, September 04, 2009 2:21 PM
  •  
Tilew  Saturday, September 20, 2008 8:20 AM
you can also click the reference and set the property Copy Local to true.
/Magnus
Magnus Burk
Magnus Burk  Friday, September 04, 2009 2:23 PM

You can use google to search for other answers

Custom Search

More Threads

• prerequisites from the same location of application
• Passing command line arguments to setup
• Clickonce problem, client unable to access data store - "An attempt to attach an auto-named database failed."
• Renaming shortcuts using VS2005 Installer Class
• c# Publish Problem
• How to create cutomized Setup ?
• Only curious: Uninstall services
• Another Icon in ClickOnce Deplyment?
• Setup project: install Windows Service with new user fails with "No mapping between account names and security IDs was done"
• clickonce does not pull in GACed assemblies when publishing