Error message "Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC"

.NetClickonceGacStdole

.Net Problem Overview


When one user tries to run the application, our ClickOnce application is reporting:

> Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC.

It's interesting to note that the GAC (C:\Windows\assembly) does not have stdole installed in it. How do I get it there?

We are using .NET 3.5, and it has been installed on this computer.

.Net Solutions


Solution 1 - .Net

Try going to the Publish tab in the project properties and then select the Application Files button. Then set the following properties:

  • File Name of stdole.dll
  • Publish status to Include
  • Download Group to Required

After that you need to republish your application.

If the reference has CopyLocal=true, then the reference will be published with the application. If the reference has CopyLocal=false then the reference will be marked as a prerequisite. This means the assembly must be installed in the client's GAC before the ClickOnce application will install.

There are some assemblies that are installed into the GAC because of the Visual Studio install, not the .NET Framework install. This could be your situation.

Solution 2 - .Net

So it turns out that the .NET files were copied to C:\Program Files\Microsoft.NET\Primary Interop Assemblies\. However, they were never registered in the GAC.

I ended up manually dragging the files in C:\Program Files\Microsoft.NET\Primary Interop Assemblies to C:\windows\assembly and the application worked on that problem machine. You could also do this programmatically with Gacutil.

So it seems that something happened to .NET during the install, but this seems to correct the problem. I hope that helps someone else out!

Solution 3 - .Net

I my case, I solved this issue going to the Publish tab in the project properties and then select the Application Files button. Then just:

Note: Before you apply this solution, make sure that you have already (as I did), checked all your solution's projects and found no references to stdole.dll assembly.

1 - Located stdole.dll file;

2 - Changed its Publish status to Exclude

3 - After that you need to republish your application.

This issue happened on a Visual Studio 2012, after its migration from Visual Studio 2010.

Hope it helps.

Solution 4 - .Net

I had the same problem with a ClickOnce deployment.

I solved the problem by going to the 'Publish' tab in the project properties and then selecting the 'Application Files' button.

I then selected the options:

  • 'File Name' of 'stdole.dll'
  • 'Publish status' to 'Include' and
  • 'Download Group' to 'Required'.

This fixed my problem when I re-published.

I hope this help you :D

Solution 5 - .Net

We had the same issue with our ClickOnce application that uses Interop with Microsoft Office. It happened only on a few computers in the company.

The best fix we found out was to modify MS Office installation on problematic computers (through the Programs and Features panel) and ensure that ".NET programmability feature" (not sure of the name of the component - our Microsoft_Office versions are not English) was installed for each of the MS Office applications (Excel, Word, Outlook, etc.). This seems to not be included in a default install.

Then the problem with stdole.dll was fixed.

I hope this might help.

Solution 6 - .Net

Well, you can't install to the GAC using ClickOnce. This is documented in this MSDN article.

Solution 7 - .Net

My solution: I opened the references folder in Solution Explorer (showing all files), and for each assembly that the installation complained about (the name of the assembly may not be exactly the same as the filename of the assembly - within object explorer, but easy enough to figure out), I changed the Copy Local to True. I ended up needing to do that with each Microsoft Office/COM-related assembly.

Solution 8 - .Net

Check if you're really using EnvDTE reference. If not, remove it and recompile.

Solution 9 - .Net

Interesting, I didn't have any references to stdole in my project, but I had a user still receiving the error. I had to add the reference, then change the setting to include. Hopefully that will work.

Solution 10 - .Net

To H2oRider -- does your application access the Oracle dll in the GAC? What I recommend you do is this: Add the dll to your project and set the build action to "content" and set "copy to output directory" to "copy always".

Then delete your reference(s) to the dll in the GAC. Re-add the reference, but this time drill down to the one you just added to your project.

Now publish it. The application will look for the dll locally, and the dll is included in the deployment so it will find it.

If this doesn't work, then it might be that you can not use that dll if included locally rather than in the GAC. This is true of some assemblies, like the Office PIAs. In that case, the only way to deploy it is to wrap it in a setup & deployment package and use the Bootstrapper Manifest Generator to turn it into a prerequisite you can publish with ClickOnce deployment.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionproudgeekdadView Question on Stackoverflow
Solution 1 - .NetDarin DimitrovView Answer on Stackoverflow
Solution 2 - .NetproudgeekdadView Answer on Stackoverflow
Solution 3 - .NetJulio NobreView Answer on Stackoverflow
Solution 4 - .NetrpfView Answer on Stackoverflow
Solution 5 - .NetBenlitzView Answer on Stackoverflow
Solution 6 - .NetMagnus JohanssonView Answer on Stackoverflow
Solution 7 - .Netuser1422348View Answer on Stackoverflow
Solution 8 - .NetFernandoView Answer on Stackoverflow
Solution 9 - .NetMikeView Answer on Stackoverflow
Solution 10 - .NetRobinDotNetView Answer on Stackoverflow