locked
Ribbon tab only loads on debug, not when published RRS feed

  • Question

  • I saw a similar post but it didn't solve my specific problem.

    I've got a Word template with code behind. There is a ribbon tab that I've added so that the user can manipulate the generated document.

    When I do a Debug to run the solution in VS 2008, I see the tab and it functions just fine.

    When I published the document to a file share per the deployment requirements and then launch the template, the ribbon tab isn't visible.

    Was I supposed to do some kind of additional wireup prior to publishing?
    Monday, October 19, 2009 9:46 PM

Answers

  • Tim, thanks for following up.

    I went back to my dev environment and tried to execute the code-behind document and it worked. The only thing that had changed since the time I was having problems was that I had rebooted the system and I didn't have Visual Studio with the solution loaded while I ran the test.

    Not sure if there is a solution in that, but for now the problem seems to be resolved.

    Thanks again for your help.
    • Marked as answer by Tim Li Thursday, October 29, 2009 1:58 AM
    Wednesday, October 28, 2009 2:15 PM

All replies

  • Hello rblitz,

    Welcome to MSDN forums!

    Do you receive any error message when you load up your template? Are you working on VSTO 3.0?

    Typically, a document-level customization is loaded follow the steps as the below document shows:
    http://msdn.microsoft.com/en-us/library/zcfbd2sk.aspx

    This could happen for many different reasons, but unless you be more specific(what steps have you take to run this solution) I could not tell what exactly cause this problem.

    However, based on my experience this is more possible be a security problem, therefore, please pay more attention to the Office Solution Securities:
    http://msdn.microsoft.com/en-us/library/bb157863.aspx

    If you have any further question, please feel free to follow up.

    Thanks.


    Tim Li

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, October 20, 2009 6:51 AM
  • It's not really clear exactly what you did when you "published" your solution...

    Did you follow the instructions for your software combination (VS2008 & Office 2007) in the article pinned at the top of the forum?
    Deploying Office Solutions to End User Computers
    Cindy Meister, VSTO/Word MVP
    Tuesday, October 20, 2009 8:54 AM
  • Thank you for your response. Those links were helpful in extending my understanding of the load and security processes.

    I've set up a share to which I publish the vsto (3.0) solution and I don't receive any errors. When I go to the share via a UNC path and double click on the dotx file I see this error in the event log:

    Customization URI: file://eadev2916a/vstopublishing/resumegeneration/Resume Doc.vsto
    Exception: Customized functionality in this application will not work because it has not been granted trust. The certificate used to sign the deployment manifest is unknown, and the customization itself (Resume Doc) is not on the inclusion list. Contact your administrator for further assistance.
    
    
    ************** Exception Text **************
    System.Security.SecurityException: Customized functionality in this application will not work because it has not been granted trust. The certificate used to sign the deployment manifest is unknown, and the customization itself (Resume Doc) is not on the inclusion list. Contact your administrator for further assistance.
       at Microsoft.VisualStudio.Tools.Office.Runtime.OfficeAddInDeploymentManager.VerifyAddInTrust(ClickOnceAddInTrustEvidence evidence)
       at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
       at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
    The Zone of the assembly that failed was:
    MyComputer
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3074 (QFE.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.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.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.Xml.Linq
        Assembly Version: 3.5.0.0
        Win32 Version: 3.5.30729.1 built by: SP
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
    ----------------------------------------

    I checked the Custom Property in the dotx file that holds the reference to the .vsto file. It appears correct because if I place the URL part of it into Windows Explorer I go to the share I created.

    In Word, I've created Trusted locations to the UNC path where the dotx file is published and I used the windows MMC Certificates add-in to load my test certificate into the Trusted Publishers certificate store.

    I'm sure about any other security issues that could be contributing to this problem.
    Tuesday, October 20, 2009 3:37 PM
  • I just tried loading it from an XP machine and it works. Odd. The problem only seems to be on my development workstation which is a 64bit Windows 2008 Server running on a virtual server. Are there special restrictions that a Windows 2008 Server might impose on the VSTO runtime?
    Tuesday, October 20, 2009 5:20 PM
  • Hello,

    Sorry for the delay.

    To narrow down this issue, we could download a sample of VSTO Windows Installer deployment, if the sample works then we could focus on the security part of solution:
    http://code.msdn.microsoft.com/VSTO3MSI

    Meanwhlile, please try to use Inculusion list to grant trust to your solution:
    http://msdn.microsoft.com/en-us/library/bb608607.aspx

    Hope this helps, looking forward to your comments.


    Thanks.


    Tim Li

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, October 26, 2009 9:17 AM
  • Hello,

     

    I am writing to check the status of the issue on your side. Could you please let me know if the suggestion works for you or not? If you have any questions or concerns, please feel free to let me know. I will be more than happy to be of assistance.

    Thanks.


    Tim Li

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, October 28, 2009 9:40 AM
  • Tim, thanks for following up.

    I went back to my dev environment and tried to execute the code-behind document and it worked. The only thing that had changed since the time I was having problems was that I had rebooted the system and I didn't have Visual Studio with the solution loaded while I ran the test.

    Not sure if there is a solution in that, but for now the problem seems to be resolved.

    Thanks again for your help.
    • Marked as answer by Tim Li Thursday, October 29, 2009 1:58 AM
    Wednesday, October 28, 2009 2:15 PM