locked
Add-in no XP RRS feed

  • Pergunta

  • Olá pessoal,
    Sou novo aqui no fórum. Pesquisei pra ver se já havia a solução para o meu problema porém não consegui encontrar neste fórum.
    É o seguinte, estou desenvolvendo um add-in para o office 2007 (c#, VS2008). Quando executo a aplicação pelo VS no Windows Vista funciona tranquilo; quando executo no XP dá o seguinte erro:

    An add-in could not be found or could not be loaded

    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 load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
    File name: 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
       at Microsoft.VisualStudio.Tools.Applications.AddInAdapter.Microsoft.VisualStudio.Tools.Applications.Contract.IEntryPointContract2.LoadEntryPoints(EntryPointInfo info)
       at Microsoft.VisualStudio.Tools.Office.Internal.AddInHostAdapter.LoadEntryPoints()
       at Microsoft.VisualStudio.Tools.Office.Runtime.EntryPointView.Microsoft.VisualStudio.Tools.Office.Runtime.IEntryPointView.Execute()
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.ExecuteEntryPoint(IEntryPointView entryPointView, IntPtr hostServiceProvider, String assemblyName, String[] entryPoints)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.StartAddIn(IntPtr hostServiceProvider, AddInToken addInToken, String assemblyName, String[] entryPoints)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.StartAddIn(IntPtr hostServiceProvider, AddInToken addInToken, String assemblyName, String[] entryPoints)
       at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String documentFullLocation, String documentName, String assemblyLocation, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)


       --- End of inner exception stack trace ---


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Office.Runtime.v9.0
        Assembly Version: 9.0.0.0
        Win32 Version: 9.0.30729.1
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
        Assembly Version: 3.5.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.AddIn
        Assembly Version: 3.5.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0
        Assembly Version: 9.0.0.0
        Win32 Version: 9.0.30729.1
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0
        Assembly Version: 9.0.0.0
        Win32 Version: 9.0.30729.1
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll
    ----------------------------------------
    Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
        Assembly Version: 9.0.0.0
        Win32 Version: 9.0.30729.1
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Deployment
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Security
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
    ----------------------------------------
    System.AddIn.Contract
        Assembly Version: 2.0.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn.Contract/2.0.0.0__b03f5f7f11d50a3a/System.AddIn.Contract.dll
    ----------------------------------------



    Já tenho instalado o Microsoft Visual Studio 2008 Tools for Office.
    Se alguém puder me ajudar agradeceria bastante.
    Um abraço a todos.
    domingo, 12 de outubro de 2008 14:58

Respostas

  • Pessoal, consegui a resposta.
    Vou colocar aqui caso outros tenham o mesmo problema.
    As dll`s Microsoft.Office.Interop.Excel e office não estavam instaladas no GAC (global assembly cache). Usei o comando gacutil e as instalei. Apesar de estas dll`s estarem referenciadas no projeto e estarem na pasta do Visual Studio 2008, elas precisavam estar instaladas no GAC. No Vista elas são instaladas quando executamos o projeto pelo VS.
    Flw pessoal.
    sexta-feira, 17 de outubro de 2008 01:14