none
Add-Ins trust issue with network drives? RRS feed

  • Question

  • This is an issue that touches not just on my VSTO ribbon add-in, but likely on Excel 2010 and/or Windows 7 trust/privilege.  But because it's a ribbon project, I'm posting it in the VSTO forum.

    I have two systems building ribbon projects; both involve Win7/Excel 2010/VSTO ribbon add-in.  I have had the projects on my local drive and building them with no problem for some time.  In these cases, after a successful build, you can select File > Options > Add-Ins > COM-Add Ins to bring up the COM Add-Ins dialog, and my ribbon's Load Behavior (shown at the bottom of the dialog) is "Load at Startup."   Perfect, and it works fine.

    If I move these projects to a network drive -- which I need to do at this point -- and build them, then I see that things have changed in the COM Add-Ins dialog. The Load Behavior is "Unloaded."   If I select the checkbox for my add-in in the list and click OK, then immediately re-open the COM Add-Ins dialog, I find that the checkbox did not remain selected.  And, of course, my ribbon doesn't load when I start up Excel 2010.

    I've tried the following:

    • Made sure my excel.exe.config file includes <loadFromRemoteSources enabled="true"/>
    • Followed instructions in http://msdn.microsoft.com/en-us/library/bb772070.aspx to add key values to \HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\.NETFramework\Security\TrustManager\PromptingLevel.  This had no effect.
    • Made sure all my Trust Center settings were relaxed: Enable all macros; Trust access to the VBA project object model, etc.
    • In Excel > Trust Center > Trusted Locations, selected Allow Trusted Locations on my network.  This had no effect.
    • In Excel > Trust Center > Trusted Locations, added \\view\brolsmab_750_w7_2010\J750igxl\tools\DataTools\IGXLRibbon\bin\Debug\   This had no effect.

    Has anyone else come up against something like this and solved it?



    Wednesday, January 25, 2012 8:00 PM

Answers

  • > So what you are trying to do, as far as I can see, is sharing your VSTO project with others, and allowing everyone who can access the project to edit and debug the add-in, right?

    Right. Typically, our projects are under source control so that others can access and contribute to the project, and the views into our projects are on network drives. I should not be forced to copy the project to my local drive in order to work on it.

    > You can open the project and then built it first. Instead of launching Excel program separately, you should press F5 to start debug mode. VSTO add-in would be loaded in this manner.

    This does not work for me; when I use the F5 method, the VSTO add-in's Load Behavior in the COM Add-Ins dialog remains as "Unloaded", and the ribbon therefore does not load at Excel startup.

    > Also you can try to add the site where the VSTO solution locates at to Trusted Locations:

    File -> Options -> Trust Center -> Trust Center Setting -> Trusted Locations -> Check  the item "Allow Trusted Locations on my network" -> Add new location to add the site

    No success with that (I mentioned them as the fourth and fifth bullets in my original posting).

    I suspect this is a Windows 7 trust issue of some sort...

    Actually you are asking some features about version control. You need to set up a server to help you on this. Something like SVN, Github, Bitbucket, VSS, and TFS are all your options. See this thread:

    http://stackoverflow.com/questions/8927438/how-can-i-share-development-of-same-visual-studio-2010-project-between-2-pcs

    and

    http://msdn.microsoft.com/en-us/library/ms181368.aspx

    I hope this helps


    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 27, 2012 3:05 AM
    Moderator

All replies

  • Hi Anonymous,

    Thanks for your post.

    So what you are trying to do, as far as I can see, is sharing your VSTO project with others, and allowing everyone who can access the project to edit and debug the add-in, right?

    Here is my test result:

    You can open the project and then built it first. Instead of launching Excel program separately, you should press F5 to start debug mode. VSTO add-in would be loaded in this manner.

    Also you can try to add the site where the VSTO solution locates at to Trusted Locations:

    File -> Options -> Trust Center -> Trust Center Setting -> Trusted Locations -> Check  the item "Allow Trusted Locations on my network" -> Add new location to add the site

    I hope this helps.


    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 26, 2012 9:35 AM
    Moderator
  • try setting env variable VSTO_SUPPRESSDISPLAYALERTS to 0 and restart excel and try to load your add-in again. Does it show any message box?
    Thursday, January 26, 2012 9:38 AM
  • > So what you are trying to do, as far as I can see, is sharing your VSTO project with others, and allowing everyone who can access the project to edit and debug the add-in, right?

    Right. Typically, our projects are under source control so that others can access and contribute to the project, and the views into our projects are on network drives. I should not be forced to copy the project to my local drive in order to work on it.

    > You can open the project and then built it first. Instead of launching Excel program separately, you should press F5 to start debug mode. VSTO add-in would be loaded in this manner.

    This does not work for me; when I use the F5 method, the VSTO add-in's Load Behavior in the COM Add-Ins dialog remains as "Unloaded", and the ribbon therefore does not load at Excel startup.

    > Also you can try to add the site where the VSTO solution locates at to Trusted Locations:

    File -> Options -> Trust Center -> Trust Center Setting -> Trusted Locations -> Check  the item "Allow Trusted Locations on my network" -> Add new location to add the site

    No success with that (I mentioned them as the fourth and fifth bullets in my original posting).

    I suspect this is a Windows 7 trust issue of some sort...

    Thursday, January 26, 2012 2:15 PM
  • Hi DamianD,

    OK, added the system env variable VSTO_SUPPRESSDISPLAYALERTS set to 0 and rebooted and retested loading the add-in.  No message box appears.

    Thursday, January 26, 2012 2:37 PM
  • > So what you are trying to do, as far as I can see, is sharing your VSTO project with others, and allowing everyone who can access the project to edit and debug the add-in, right?

    Right. Our projects are under source control so that others can contribute to the project, with views set up on a network drive. I should not have to copy the project to my local drive in order to load the COM add-in.

    > You can open the project and then built it first. Instead of launching Excel program separately, you should press F5 to start debug mode. VSTO add-in would be loaded in this manner.

    Building/running with F5 yields the same results. The Load Behavior is still "Unloaded" and the ribbon add-in does not appear at Excel startup.

    > Also you can try to add the site where the VSTO solution locates at to Trusted Locations:

    File -> Options -> Trust Center -> Trust Center Setting -> Trusted Locations -> Check  the item "Allow Trusted Locations on my network" -> Add new location to add the site

    Those were the last two bullets in my original post.  I've set them, and there was no change.

    I suspect this is a Windows 7 setting of some sort...

    Thursday, January 26, 2012 2:41 PM
  • Open up ProcMon, start excel and filter by Excel process. Do you see if it (Excel) is at least trying to access that network location? Does it read your files?
    Thursday, January 26, 2012 3:56 PM
  • > So what you are trying to do, as far as I can see, is sharing your VSTO project with others, and allowing everyone who can access the project to edit and debug the add-in, right?

    Right. Typically, our projects are under source control so that others can access and contribute to the project, and the views into our projects are on network drives. I should not be forced to copy the project to my local drive in order to work on it.

    > You can open the project and then built it first. Instead of launching Excel program separately, you should press F5 to start debug mode. VSTO add-in would be loaded in this manner.

    This does not work for me; when I use the F5 method, the VSTO add-in's Load Behavior in the COM Add-Ins dialog remains as "Unloaded", and the ribbon therefore does not load at Excel startup.

    > Also you can try to add the site where the VSTO solution locates at to Trusted Locations:

    File -> Options -> Trust Center -> Trust Center Setting -> Trusted Locations -> Check  the item "Allow Trusted Locations on my network" -> Add new location to add the site

    No success with that (I mentioned them as the fourth and fifth bullets in my original posting).

    I suspect this is a Windows 7 trust issue of some sort...

    Actually you are asking some features about version control. You need to set up a server to help you on this. Something like SVN, Github, Bitbucket, VSS, and TFS are all your options. See this thread:

    http://stackoverflow.com/questions/8927438/how-can-i-share-development-of-same-visual-studio-2010-project-between-2-pcs

    and

    http://msdn.microsoft.com/en-us/library/ms181368.aspx

    I hope this helps


    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 27, 2012 3:05 AM
    Moderator