locked
VS 2010 Testing on a Network Share RRS feed

  • Question

  • Does any one know what steps are required to have your projects (both Class Library and Test) to work from a Network Share (\\SomeServer\SomeDir\*, or a Mapped Drive)?

    When the Library project works fine from a network share, but when I try to Load the Test List Editor window I get the following error:
    Error loading \\SomeServer\SomeDir\TestProjectSln\TestProject\bin\Debug\TestProject.dll: Could not load file or assembly 'file://\\SomeServer\SomeDir\TestProjectSln\TestProject\bin\Debug\TestProject.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

    I have tried some suggestions form various sources including the follow:
               %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\caspol.exe -quiet -machine -ag 1.2 -url file://w:\* FullTrust")
               %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\caspol.exe -quiet -machine -ag 1.2 -url file://\\syrsc2\tshome\* FullTrust")
               %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\caspol.exe -quiet -machine -addgroup LocalIntranet_Zone -strong -file \\SomeServer\SomeDir\Com\StrongNamed.dll -noname -noversion FullTrust -name Our_Strong_Name")

    We use the same strong name key for all our applications so that they can run from a network drive.  i have tried to strong name both the Class Library, and the Test Project.

    Thank you for your time in advance.


    Adam - Please remember to mark the answers.
    Tuesday, June 15, 2010 10:43 AM

Answers

  • After doing some Poking and Hoping I found the solution:

    http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx


    has the solution after all, but it does specify what Config file you need to have this in for Visual Studio.  If you add this to the devenv.exe.config file in the "Microsoft Visual Studio 10.0\Common7\IDE" directory, it will stop the error message from happening and allow you to run tests from in the IDE.


    Adam - Please remember to mark the answers.
    Wednesday, June 16, 2010 3:40 PM

All replies

  • After doing some Poking and Hoping I found the solution:

    http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx


    has the solution after all, but it does specify what Config file you need to have this in for Visual Studio.  If you add this to the devenv.exe.config file in the "Microsoft Visual Studio 10.0\Common7\IDE" directory, it will stop the error message from happening and allow you to run tests from in the IDE.


    Adam - Please remember to mark the answers.
    Wednesday, June 16, 2010 3:40 PM
  • Hello,

    Thanks for sharing the solution. I think this would be beneficial to other community members as well.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Friday, June 18, 2010 7:43 AM
    Moderator
  • Does this same solution work for Visual Studio 2012 Ultimate?

    Ken Riehl

    Wednesday, November 28, 2012 8:45 PM
  • Unless they have again changed they way they are handling security I would assume so but I haven't tried it on 2011 yet. I would try it and if it works please post back here so people will know.

    Adam - Please remember to mark the answers.

    Friday, November 30, 2012 3:38 PM
  • I've added <loadFromRemoteSources enabled="true"/> to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.config file, restarted VS2012 and still getting the same error.

    ------ Discover test started ------
    Could not load file or assembly 'file:///Q:\OnCore\Automation\OnCorePMM\AddSuppInfraProducts\AddSuppInfraProducts\bin\Debug\AddSuppInfraProducts.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
    ========== Discover test finished: 0 found (0:00:05.1844861) ==========


    Ken Riehl

    Friday, November 30, 2012 3:49 PM