index > Visual Studio Team System - Testers > Assembly not trusted exception while N-Unit Testing

Assembly not trusted exception while N-Unit Testing

Hi,

I am trying to test this method but I just cannot get around to run it directly or in a debug mode.It gives me the following exception on running it with teh test manager :

"Failed to Queue Test Run xyz@ISCWS-00-883 2006-04-20 16:51:03' with id {d9a35ba4-2ef7-4675-9618-c23948673d91}: Microsoft.VisualStudio.TestTools.TestManagement.ExecutionException: Test Run deployment issue: The location of the file or directory 'c:\Solution\TestProj\bin\debug\abc.dll' is not trusted."

The problem I feel is that the abc.dll which is required to be refered by teh method not only does not belong to this project.(TestProj) but also does not belong to this solution or application altogether.(The scene is a child application being plugged into the parent application so the dll of the parent application is required for certain objects)

Can someone tell me how to make this dll trusted ?

I created folder in the solution and put in the dll there which is the path i pick it up from for refering it in TestProj.

bizbuz

Bit fo background firs... We do not support deployment items from networked shares that are not fully trusted. All DLLs (including the test DLL) are "deployed" implicitly, so are subject to this requirement.

"wait, I'm not using a network share!" -- Indeed you are not. However, if you downloaded a DLL from the internet, a web site, email etc. and you saved it to disk (even when it was in a zip file), Windows XP SP2 and Win2k3SP1 will attach something called "AES" to the file on disk -- this will cause those prompts in windows that say "Are you sure?" when you try to open them from explorer. If the DLL has this extra info (stored in an NTFS Alternate Data Stream), we will report the DLL as not trusted.

YOu can resolve this by finding the DLL, right clicking on it and selecting propeties. on the general tab there will be an "unblock" option. CLick this. Your test should now run fine.




SDE on VSTest
dhopton MSFT

I've run into the same problem, however, when I right click on the .dll and select properties, I have no "Unblock" option. Any suggestions?

~ HLDev

HLDev
What OS? Is this on a local drive? Is the file marked as readonly?


SDE on VSTest
dhopton MSFT

I'm using Windows XP pro, the server is Windows Server 2003. It is on a mapped network drive. The file is not readonly. I also tried logging on to the server to see if I could do it there, no luck.

~HLDev

HLDev
You need to add the Network path as a "Full Trust" path -- we will only load an assembly when the CLR tells us the location is fully trusted. You can add this using the .net configuration wizard in Administrative Tools in control panel.


SDE on VSTest
dhopton MSFT
reply 6

You can use google to search for other answers

 

More Articles

• Exception LoadTestGoalCounterNotFoundException
• VS 2005 TFS trial or workgroup edition install fails on the serve...
• Test Run deployment issue: directory is not trusted.
• How to create test project and test cases 'correctly'
• Unit test AppDomain names and custom performance counters
• code coverage on a Web service component
• Extract multiple values in one Custom Extraction Rule
• Web Test: error 400 Bad Request?
• How to add other information (e.g., test configurations) in test ...
• Viewstate hardcoded as Form Post Parameter
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• automated testing question
• Does anyone could install VS Team Suite
• Adding a custom test type to Add New Ite
• Unit testing C# code in a ASP.NET Web Se
• ASP.NET Unit Tests do not handle Redirec
• About the *.vsmdi files; did you had in
• Binding to a stored procedure
• Debugging unit tests running on ASP.NET
• How to use Team System Testing tools?
• test cases' execution order in Test List
• Context parameters across multiple web t
• Installation problem
• How can i dynamically create test suite?
• WEB Test Setting Environment variables i
• How do I avoid this error: Failed to acq

Hot Articles

• Activesync 4.1 interfering with Load Tes
• How can I recover my view of the active
• iis local instance not kicking off
• Error when running tests: Column 'TestTy
• Missing something fundamental?
• Unit Testing Windows Forms Applications
• Load test needs database
• How to create parameters in custom extra
• Cannot debug test with [DataSource] attr
• Testing in Visual Studio .NET 2003
• Extraction rules
• Can't load assembly in a new AppDomain d
• % CPU usage
• Newbie in WebTesting using 2005, How to
• ConnectionPool VS ConnectionPerUser

Recommend Articles

• How to terminate coded load test?
• How to make my ordered test the default
• Running the load agent at remote sites
• Assembly Initialization method :System.N
• How can I persist the Checked list in Te
• Unit Test Configuration
• Threesold Basics
• How to view test cases by iteration or a
• To do web Testing when there are pop ups
• Exceptions in unit tests in secondary th
• Custom Validation Rules and Parameters
• LoadTest, webtest passed always 0
• Newbie question on loadtest
• Make results file *.trx file name Have t
• Generate Unit Tests Problem