Error message "Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC"
Solution 1:
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:
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:
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:
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