none
ClickOnce deployment in migrated VSTO plug-in RRS feed

  • Question

  • I have a VSTO document-level customisation that I developed for Excel 2003 using VSTO 2005 SE and which I am now trying to migrate to VSTO 3.0 and Excel 2007/2010.  Both are built using VS 2008.

    The distribution model for the customisation was that we would publish it to a local folder from Visual Studio, copy the published folder to users' PCs, and use a custom tool using the ServerDocument class to attach the customisation to Excel workbooks and modify the CAS policy suitably.  The tool is only used by other developers and they frequently have to use several versions with different workbooks, so we are pretty happy with this system and would like to maintain it.

    When I've tried to migrate to VSTO 3.0, I've run into trouble.  It works so long as I let it install the customization.  However, this, I think, is likely to cause trouble when developers are trying to use several versions at once, so I've added the `|vstolocal` flag to the AssemblyLocation document property (actually this is still set by the ServerDocument class).  But when I do this, I get an exception while loading the customisation:

    Customization could not be loaded because the application domain could not be created.
    
    ************** Exception Text **************
    Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> System.IO.FileNotFoundException: Could not find file 'C:\Projects\Controllers\Prototype\Infrastructure\Lib\Symbols Plugin\Symbols.dll'.
    File name: 'C:\Projects\Controllers\Prototype\Infrastructure\Lib\Symbols Plugin\Symbols.dll'
    


    The error is perfectly correct in as far as it goes; that file does not exist.  The AssemblyLocation property is set to point to the .vsto file generated when I publish the customisation from Visual Studio.  This .vsto file includes this snippet:

    ...
      <deployment install="false" mapFileExtensions="true" />
      <dependency>
        <dependentAssembly dependencyType="install" codebase="Application Files\Symbols_1_0_0_188\Symbols.dll.manifest" size="14730">
          <assemblyIdentity name="Symbols.dll" version="1.0.0.188" publicKeyToken="f3ed284d5db3a38e" language="neutral" processorArchitecture="msil" type="win32" />
          <hash>
            <dsig:Transforms>
    ...

    The `dependentAssembly` tag correctly points to the manifest in 'ApplicationFiles\Symbols_1_0_0_188'.  The DLL is also deployed to that folder, as far as I can tell, now called Symbols.dll.deploy.  However, Excel is still trying to load Symbols.dll.

    Any clues on how to fix this?


    Friday, March 21, 2014 4:15 PM

All replies