How to debug solutions in Visual Studio 2010 from a network share?

I recently got a new Mac laptop and am running VS2010 on a Parallels virtual machine. Basically this works well for me, but I am having some problems debugging certain types of projects related to the fact that projects are accessed through a network resource. Testing projects do not start because the test runner cannot load the test DLLs. Web projects do not run on the Visual Studio Mini Web Server, raising the following exception:

'An error occurred loading a configuration file: Failed to start monitoring changes to path\to\web.config'.

I spent the evening etching the web with little luck on this. After reading these two posts, I tried the usual CasPol changes, but then found this post from one of the earlier beta versions of VS2010, indicating that CasPol is no longer required / supported in .NET 4.0 and VS2010.

A network resource is available both from a mapped drive and from a UNC path. The host for the UNC path is .pfs ; according to this post, Windows processes hostnames starting at the point coming from the Internet zone.

The virtual machine runs its applications under an administrator account, which appears to have all the necessary permissions to share the network to create, read, write, and delete files and folders. I say "it seems that there is", because I can not view the security properties of the corresponding folder through Explorer: the "Security" tab is simply missing.

Has anyone been able to successfully download and debug websites and test projects from a network share in VS2010?

UPDATE: I tried downloading the solutions in VS2010 on a separate native Windows machine using the IP address of my MacBook with mixed results. The test project again failed to start with an error:

Error loading \\192.168.0.4\alastair\Code\project\bin\Debug\Tests.dll: Could not load file or assembly 'file://\\192.168.0.4\alastair\Code\project\bin\Debug\Tests.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

However, the ASP.NET MVC project runs correctly as expected in this parameter, and I get exactly the same results here if I use the NETBIOS name for the MacBook.

Of course, for this I had to enable SMB exchange in Snow Leopard, which was not required to access the location in my Parallels VM. Maybe there are some settings in Parallels that I need to configure in order to change permissions on a shared resource?

I also noted this question so that moderators request it to be moved to StackOverflow; I think this might be a better forum than SuperUser.

+7
windows visual-studio-2010 parallels
source share
2 answers

Try setting <loadFromRemoteSources enabled="true"/> under the runtime element of the devenv.exe.config file, as suggested in the answer to this question . This fixed the problem for me ... Visual Studio still warns me when loading a project from a shared resource, but current tests now work.

+3
source share

This suggests that the problem is really related to Windows "handle hostnames starting from the point coming from the Internet zone." It might be something else, but option (3) below should be a quick way to (dis) prove it as part of the problem.


Period ( . ) Is not a commonly used character in the DNS host name; it is usually interpreted as a separator between the host name and the domain name (for example, localhost.localdomain). DNS hostnames are usually limited to "LDH" - letters, numbers, and hyphens.

UNC paths and Windows network names (NetBIOS) may experience similar problems. According to RFC3696 , periods are legal, but you need to avoid periods used in the host name in accordance with RFC1035 . If I read RFC1035 correctly, your hostname should be \.pfs instead of .pfs .

I am wondering if your problems will work fine if you

  • changed the host name (on the shared server) to something that did not include the point (and accordingly updated the client),
  • changed the UNC path to a shared resource (on the client) to use the correct escape sequence for periods or
  • changed the UNC path to a shared resource (on the client) to use the IP address instead of the host name.
0
source share

All Articles