Search

Assembly.Location throws ArgumentException in a Visual Studio 2010 add-in on a network share by Sergey Vlasov

Closed
as Won't Fix Help for as Won't Fix

1
0
Sign in
to vote
Type: Bug
ID: 569589
Opened: 6/22/2010 5:08:12 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
System.Reflection.Assembly.GetExecutingAssembly().Location throws ArgumentException "Absolute path information is required." in a Visual Studio 2010 add-in when running from a network share.
Details (expand)

Product Language

English

Visual Studio Version

Visual Studio 2010

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

1. Create the c:\docs folder and share it with a network.
2. Change My Documents path to this network folder: C:\users\user\My Documents properties - Location tab - click Move - select folder \\localhost\docs - OK.
3. Add <loadFromRemoteSources enabled="true"/> to the runtime section in "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config" to enable running VS 2010 add-ins from a network share.
4. In Visual Studio 2010: New project - Other Project Types - Extensibility - Visual Studio Add-in - defaults except check "I would like my Add-in to load when the host application starts"
5. To the end of the OnConnection method add
string s = System.Reflection.Assembly.GetExecutingAssembly().Location;
6. Build and Start Debugging.

Actual Results

System.ArgumentException {"Absolute path information is required."} when running VS with the new add-in.

Expected Results

No exception, the correct location stored in the s variable.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey.

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 6/30/2010 at 1:44 PM
Hi Sergey

I was able to work around this problem by mapping my share to a drive letter and then setting my My Documents root to that, instead of the network path to the share. This succeeds in getting the path.

Gary Horen
Program Manager
Visual Studio.

Posted by Microsoft on 6/22/2010 at 5:54 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by Microsoft on 6/22/2010 at 5:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Sign in to post a workaround.