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
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
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
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 condition4. 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
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