Search code examples
excelms-officeoffice-interopgacexcel-interop

Missing Microsoft.VisualStudio.OfficeTools.Controls.ManagedWrapper from GAC using clickonce on non dev pcs


We are using Microsoft.Office.Interop.Excel and Microsoft.Office.Tools.Excel in our application to export datagrids to Excel. We are also using a click once deployment and now clickonce is saying that the application requires Microsoft.VisualStudio.OfficeTools.Controls.ManagedWrapper be install in the GAC. Usually, when we get this error, the dlls are usually available to be added to the project, or someone forgot to set a property on the dll - but this dll is different - it is already in the GAC for my computer under C:\WINDOWS\assembly and the file cannot be removed.

What would be the proper way get getting this file and adding it to my project. I have seen things that require registry edits, and things for "getting dlls out of the gac" but is that neccessary?

Edit: This is a C# WPF Project.


Solution

  • I was able to get this to work by adding these dlls:

    C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.OfficeTools.Controls.ManagedWrapper\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.OfficeTools.Controls.ManagedWrapper.dll C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Applications.Runtime\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Tools.Applications.Runtime.dll C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Tools.Common\8.0.0.0__b03f5f7f11d50a3a\Microsoft.Office.Tools.Common.dll C:\Windows\assembly\GAC_MSIL\VSTOStorageWrapper.Interop\8.0.0.0__b03f5f7f11d50a3a\VSTOStorageWrapper.Interop.dll

    I didnt think it was possible to add those files from the GAC into my project but everything works out now.