<p>We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we get errors saying "System Update Required, Microsoft.mshtl.dll should be in the GAC". </p>

<p>We tried installing the PIA for Office without luck. Since Microsoft.mshtml.dll is a system dependent file we cannot include it in the package and re-distribute it. What would be the best way to deploy the application?</p>

[{'answer_id': 54787, 'author': 'Guy Starbuck', 'author_id': 2194, 'author_profile': 'https://Stackoverflow.com/users/2194', 'pm_score': 0, 'selected': False, 'text': '<p>You can <a href="http://msdn.microsoft.com/en-us/library/h4k032e1.aspx" rel="nofollow noreferrer">set up prerequisites in a clickonce app</a>, which would check for specific assemblies in the GAC before allowing users to install.  You would still need to manually install an app that includes the required office dll outside of ClickOnce, but you would at least avoid throwing errors.</p>\n'}, {'answer_id': 54804, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 2, 'selected': True, 'text': '<p>Do you know which version of MS Office you are targeting? These PIAs are very specific to the version of Office. I remember when we were building a smart client application, we used to have Build VM machines, each one targeting a specific version of Outlook.</p>\n\n<p>Another hurdle was not being able to specify these PIAs as pre-requisites or bundle them with the app. These PIAs needs to be installed on the client using Office CD (<a href="http://msdn.microsoft.com/en-us/library/aa159923.aspx" rel="nofollow noreferrer">at least for 2003 version</a>).</p>\n'}, {'answer_id': 54915, 'author': 'moza', 'author_id': 3465, 'author_profile': 'https://Stackoverflow.com/users/3465', 'pm_score': 0, 'selected': False, 'text': "<p>We are targeting Office 2003 and Office 2007, but using the Office 11 (2003) dlls as Office 2007 is backward compatible.</p>\n\n<p>The problem occurs only for Microsoft.mshtml.dll file. This file is setup as a prerequisite in the ClickOnce app.</p>\n\n<p>On this particular install we tried installing both the Office 2003 and Office 2007 PIA's to no avail.</p>\n"}, {'answer_id': 3063558, 'author': 'Karim Agha', 'author_id': 2753, 'author_profile': 'https://Stackoverflow.com/users/2753', 'pm_score': 0, 'selected': False, 'text': '<p>I had this problem too.</p>\n\n<p>The solution to this is to go to the References folder in the solution explorer, then right click Microsoft.mshtml, then Properties.</p>\n\n<p>In the Propoerties page mark "Copy Local" as True.\nThis should work.</p>\n'}]
['https://Stackoverflow.com/questions/54770', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3465/']