Excel Addin clickonce deploy dependency check RRS feed

  • Question

  • Hi All,

    We have an excel addin that is deployed via clickonce.

    We do check for updates using ApplicationDeployment.CheckForUpdate api.

    We have a case wherein an incorrect dll got referenced in the addin project which is not used at all in our code. Due to this the ref got into the dependencies list in <my addin name>.dll.manifest

    This dll is not expected to be in the client machine. This hampers when the code runs checking for updates using ApplicationDeployment.CheckForUpdate and fails with following

    System.Deployment.Application.DependentPlatformMissingException: Unable to install or run the application. The application requires that assembly Microsoft.SqlServer.Diagnostics.STrace Version be installed in the Global Assembly Cache (GAC) first. 
      at System.Deployment.Application.PlatformDetector.VerifyPlatformDependencies(AssemblyManifest appManifest, AssemblyManifest deployManifest, String tempDir)
      at System.Deployment.Application.DeploymentManager.DeterminePlatformRequirementsCore(Boolean blocking)
      at System.Deployment.Application.DeploymentManager.DeterminePlatformRequirements()
      at System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate(Boolean persistUpdateCheckResult)

      at ShiraAddIn.Util.AddinUpgradeTask.UpdateApplication()

    But now if user closes all workbooks and open an excel, the upgrade goes fine for the same user.

    So wanted to know if there is a change in behavior of checking for dependencies when its done via api and while clickonce does the auto upgrade.

    We are thinking about alternatives  for checking for updates as this looks like a gray area. I did research a lot but not able to find the differentiation.

    At run time ofcource there is a difference in loading the referenced dlls, and only those get loaded by the CLR which are used in the code. If its the same in case of clickonce then we would expect consistency.

    My concern is, in case of clickonce dependency check, it should be consistent both via API as well as when done by clickonce during the actual deployment.

    Thursday, September 10, 2015 4:28 AM

All replies