Tabs Studio Blog (organizing Visual Studio document tabs)

June 23, 2010

Running add-ins from a network location in Visual Studio 2010

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 11:07 am

.NET runtime traditionally has strict rules against running managed code from a network. In Visual Studio 2008 (CLR v2) to run Tabs Studio from a network share you had to add special “Code Access Security Policy”.

In Visual Studio 2010 (CLR v4) if you try to run Tabs Studio v2.0.5 from a network share you get error number 80131515:

Tabs Studio add-in failed to load with error 80131515 in VS 2010

Tabs Studio add-in failed to load with error 80131515 in VS 2010


To allow Tabs Studio to run you have to add the loadFromRemoteSources element (see the MSDN reference) to the “C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config” (note, you need to run your editor with admin rights for correct devenv.exe.config modification):

<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>

Plus you have to upgrade to Tabs Studio v2.0.6 that workarounds Assembly.Location throws ArgumentException.

Another potential problem is when you download Tabs Studio add-ins to your computer for Visual Studio 2010 from the Internet they may end up blocked by Windows (it is not a problem for Visual Studio 2008):

Saver add-in marked as a file from another computer

Saver add-in marked as a file from another computer


Loading such add-in for VS 2010 silently fails in Tabs Studio v2.0.5 and gives the following error in Tabs Studio v2.0.6:
Blocked Saver add-in loading error in VS 2010

Blocked Saver add-in loading error in VS 2010


To solve this problem you can either unblock Saver.dll in Windows Explorer or enable the loadFromRemoteSources switch in devenv.exe.config the same way as for running Tabs Studio from a network share.

 

 

Organize Visual Studio tabs with Tabs Studio add-in

6 Comments

  1. Thanks, this really helped. I have My Documents redirected to a network location which means that my Visual Studio\Addins folder is also on the network path. After adding this entry, this, and another addin that was not working, loaded successfully. Thanks again.

    Comment by markchall — August 19, 2011 @ 9:05 pm

  2. […] did a search to figure out how to load an add-in from the network and came across this post. In the post Sergey provides the necessary changes to devenv.exe.config (located in the install […]

    Pingback by Loading Visual Studio Addins from a Network Location | Another Modified Corn Product — August 19, 2011 @ 9:40 pm

  3. Tip on this, in case someone’s still having trouble, from here: http://msdn.microsoft.com/en-us/library/dd409252.aspx

    Under Vista or Windows7 take care of thefile system Virtualization.
    Editing devenv.exe.config might result in creating a copy under

    \Users\{%UserName%}\AppData\local\VirtualStore\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config

    leaving the original file untouched. This depends on your user settings.
    It might help to open “VS 2010 as administrator” (or another XML-Editor of your choice),
    edit devenv.exe.config, inserting the

    tag, save the file and close.
    This will edit the original file, not the virtualized copy.
    Having done so referencing “remote” assemblies in your projects
    should work

    Comment by Paul Blair — November 6, 2011 @ 11:50 pm

    • Paul,
      Thank you for the tip. I’ve added a note to run an editor with admin rights.

      Comment by Sergey Vlasov — November 7, 2011 @ 6:46 am

  4. I was trying to get Tabs Studio working in a VMWare Fusion 4 VM. I was running into the error above but resolved thusly:

    1. Run notepad as administrator.
    2. Open C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config
    3. Add the line just under the tag in the file.
    4. Save the file
    5. Restart Visual Studio, go to Tools/Add-in manager and make sure “Tabs Studio” is loaded.

    Comment by @mark__a — May 30, 2012 @ 9:58 pm

  5. Thanks a lot… It helped

    Comment by arun — July 4, 2012 @ 6:57 pm


RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Blog at WordPress.com.