views:

746

answers:

3

I am a developer for a .net application that uses ClickOnce for deployment. I have deployed it over 60 times and computers have not had any issues downloading the latest release. However, when I deployed this morning, the following error occurs when computers with Office 2007 installed tries to start the application:

Unable to install or run the application. The application requires that assembly stdole Version 7.0.3300.0 be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator.

However, computers with Office 2003 can start the application with no problem.

Does anyone have any recommendations on resolving this issue?

A: 

I am not sure about your particular problem, but the Office 12 version of the stdole library is different (and -in my experience- not always backwards compatible) than then one you have when you use Office 2003.

We use a wrapper around the Office DLLs to use the Mailmerge features Office has to offer and, believe it or not, Microsoft changed the interfaces again, therefore we have to compile two different wrappers, linked against two different office versions. In short, a PITA.

I am not coding against MS office again until they don't provide a Managed library.

Despite the rant, I think that you should install Office 12 in your computer and test from there. You'll notice that all the Office stuff is different. If you can make it work under Office 12 it may be compatible with machines with Office 11 (also known as 2003), but don't count on it and test it before deploying anything.

I don't think that this has anything to do with ClickOnce; it's more a GAC/OfficeVersion issue. Also, check for possible Vista problems, as the UAC and the DEP stuff tend to interfere with the way "old" applications used to work.

Martín Marconcini
+2  A: 

As far as I know this version of stdole is removed when Office2k7 is installed. You could install it individually via gacutil on all target machines or somehow include it via the ClickOnce package bootstrapper. On a mac right now so I can't test.

RandomNoob
It's not really "removed" afaik. I have it here on my Office12 Machines, but it's not the same that the Office11 machines have.
Martín Marconcini
A: 

I had exactly the same problem once our company started rolling out Office 2007. My first quick solution was to just copy stdole to the GAC of the two computers giving the problem.

After investigating I found that our application was not actually using stdole. It might have added the reference when I tested a COM dll which I removed after testing. So my solution was just to exclude it from the Application Files dialog under the Publish tab. So first make sure you need it.

As far as I understand it is required when you reference some COM dlls like Office. If this is the case with you I found a few posts saying the problem was resolved by changing the Publish Status on the Application Files dialog from Prerequisite to Include and the Download Group from None to Required. In my case stdole was added by default as Prerequisite.

Timo