title: ClickOnce Application throws error "..requires assembly MySql.Data Version 6.5.4.0 be installed in the Global Assembly Cache (GAC) first."
body: <p>I'm new to deploying .NET apps, so please let me know if any more details are required. </p>
  
  <p>I developed a C# console app in Visual Studio with MySql. This was deployed on 2 Windows 7 machines via ClickOnce Application and works fine. Tried to install in on a Windows XP machine and got the following error: </p>
  
  <blockquote>
    <p>System Update Required: </p>
    
    <p>Unable to install or run the application. The application requires
    that assembly MySql.Data Version 6.5.4.0 be installed in the Global
    Assembly Cache (GAC) first.</p>
  </blockquote>
  
  <p>I've done some googling and I don't think it's any of the issues that have been mentioned - no firewall, no antivirus, on Administrator account with all permissions. I checked C:\Windows\Assembly and MySql.Data.CF.dll V 6.5.4.0 is listed. </p>
  
  <p>Coworker also dug up the following error log: </p>
  
  <blockquote>
    <p>PLATFORM VERSION INFO     Windows             : 5.1.2600.196608 (Win32NT)     Common
    Language Runtime  : 4.0.30319.1   System.Deployment.dll       : 4.0.30319.1
    (RTMRel.030319-0100)  clr.dll             : 4.0.30319.1 (RTMRel.030319-0100)
      dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)  dfshim.dll          :
    4.0.31106.0 (Main.031106-0000)</p>
    
    <p>SOURCES   Deployment url          :
    file:///C:/GearBox/app/publish/ClockworksConsoleApplication.application
      Application url         :
    file:///C:/GearBox/app/publish/Application%20Files/ClockworksConsoleApplication_1_0_0_6/ClockworksConsoleApplication.exe.manifest</p>
    
    <p>IDENTITIES    Deployment Identity     :
    ClockworksConsoleApplication.application, Version=1.0.0.6,
    Culture=neutral, PublicKeyToken=efa8c6cf1fc52128,
    processorArchitecture=msil    Application Identity        :
    ClockworksConsoleApplication.exe, Version=1.0.0.6, Culture=neutral,
    PublicKeyToken=efa8c6cf1fc52128, processorArchitecture=msil,
    type=win32</p>
    
    <p>APPLICATION SUMMARY   * Installable application.</p>
    
    <p>ERROR SUMMARY     Below is a summary of the errors, details of these
    errors are listed later in the log.   * Activation of
    C:\GearBox\app\publish\ClockworksConsoleApplication.application
    resulted in exception. Following failure messages were detected:      +
    Failed to load the runtime. (Exception from HRESULT: 0x80131700)</p>
    
    <p>COMPONENT STORE TRANSACTION FAILURE SUMMARY   No transaction error was
    detected.</p>
    
    <p>WARNINGS  There were no warnings during this operation.</p>
    
    <p>OPERATION PROGRESS STATUS     * [8/31/2012 9:56:00 AM] : Activation of
    C:\GearBox\app\publish\ClockworksConsoleApplication.application has
    started.  * [8/31/2012 9:56:02 AM] : Processing of deployment manifest
    has successfully completed.   * [8/31/2012 9:56:02 AM] : Installation
    of the application has started.   * [8/31/2012 9:56:02 AM] : Processing
    of application manifest has successfully completed.   * [8/31/2012
    9:56:08 AM] : Found compatible runtime version 2.0.50727.</p>
    
    <p>ERROR DETAILS     Following errors were detected during this operation.
      * [8/31/2012 9:56:08 AM] System.Runtime.InteropServices.COMException
          - Failed to load the runtime. (Exception from HRESULT: 0x80131700)
          - Source: System.Deployment
          - Stack trace:          at System.Deployment.Application.NativeMethods.IClrMetaHostPolicy.GetRequestedRuntime(MetaHostPolicyFlags
    policyFlags, String binaryPath, IStream configStream, StringBuilder
    version, Int32&amp; versionLength, StringBuilder imageVersion, Int32&amp;
    imageVersionLength, Int32&amp; pdwConfigFlags, Guid interfaceId)          at
    System.Deployment.Application.NativeMethods.GetAssemblyCacheInterface(String
    CLRVersionString, Boolean FetchRuntimeHost, CCorRuntimeHost&amp;
    RuntimeHost)          at
    System.Deployment.Application.PlatformDetector.VerifyPlatformDependencies(AssemblyManifest
    appManifest, AssemblyManifest deployManifest, String tempDir)             at
    System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState
    subState, ActivationDescription actDesc, Int64 transactionId,
    TempDirectory&amp; downloadTemp)          at
    System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState&amp;
    subState, ActivationDescription actDesc)          at
    System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
    activationUri, Boolean isShortcut, String textualSubId, String
    deploymentProviderUrlFromExtension, BrowserSettings browserSettings,
    String&amp; errorPageUrl)             at
    System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
    state)</p>
    
    <p>COMPONENT STORE TRANSACTION DETAILS   No transaction information is
    available.</p>
  </blockquote>
  
  <p>I was previously getting another error at install, </p>
  
  <blockquote>
    <p>URLDownloadToCacheFile failed with HRESULT '-2146697211' Error: An
    error occurred trying to download
    'http://station52/clockworksEXE/ClockworksConsoleApplication.application'.</p>
  </blockquote>
  
  <p>however, I changed my settings to publish from CD instead of website and it seems to have solved this, but I'm still getting the GAC error. </p>
  
  <p>Any ideas? </p>