The location of the file or directory xxx is not trusted.

When running unit tests i get a return code of Abort and an error message of:

Failed to Queue Test Runxxx: Microsoft.VisualStudio.TestTools.TestManagement.ExecutionException:
Test Run deployment issue: The location of the file or directory 'W:\assemblies\xxx' is not trusted.

I have seen other posts where the answer is using the caspol tool to set the permission to trusted. I tried that and it did not work. I also tried adding the assemblies that the test project references to the GAC and still no luck. After each try I closed then reopenned the VS2005 IDE.

When running thecaspol -m -liststatement it does show those assemblies as being fully trusted on the computer.

The assemblies being reference by the unit tests is actually a local drive c:\xxx mapped to a 'w' drive so that all developer machines have the same reference path(ie w:\assemblies).

Any help would be greatly appreciated as this is causing serious issues within our development staff.

Thanks
Paul

[1113 byte] By [xxxxxxxxxxx] at [2007-12-21]
# 1

Hi Paul

Have you verified that your referenced assembly does not have a security attribute set? Was the assembly downloaded from the Internet, or attached to you in an e-mail? To make sure this is not the case, view the properties of the file and in the General tab, and verify that the file is not blocked.

Thanks,
David Gorena Elizondo
[MSFT] VSTS

DavidGorenaElizondo-MSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2

David,

I did verify that. These are assemblies that my team has created themselves.

Thanks

Paul

xxxxxxxxxxx at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3

Ok, so the problem seems to definitely be your path not being trusted.

Add your directory as a trusted URL to the .Net Framework 2.0 Configuration (under control panels -> Administrative Tools -> .Net framework 2.0 configuration -> Runtime Security Policy -> Increase Assembly Trust)

Thanks,
David Gorena Elizondo
[MSFT] VSTS

DavidGorenaElizondo-MSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 4

David,

I tried that also but am still getting the same error.

Paul

xxxxxxxxxxx at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 5

Hello again

Ok, so lets try this step by step, since I tried it in my local machine and I see it working:

1. In the .NET Framework 2.0 Configuration, Go to Runtime Security Policy | Machine | All_Code

2. Right click All_Code, select "New...", and select any name for your new group. Click Next

3. Select URL as your condition

4. Type \\machine_name\shared_folder\assembly.dll or \\machine_name\shared_folder\* and click Next

5. Make sure permission is set to FullTrust

6. Click Next, and Finish

7. Close all your VS IDEs, restart, and try again

Let me know how it goes

Thanks,
David Gorena Elizondo
[MSFT] VSTS

DavidGorenaElizondo-MSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 6

Paul if what David proposed did not help, can you try the following (apparently this is the same):
caspol -machine -addgroup 1 -url file://w:/* FullTrust -name FileW

Thank you,
Michael Koltachev
VSTS

MichaelKoltachev at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 7

Michael and Dave,

These last two posts seemed to have resolved the issue.

Thanks for all your help. Much appreciated.

Paul

xxxxxxxxxxx at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified