Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.
This is an error message I got when trying to run unit tests within Visual Studio 2008 (developer edition):
Failed to queue test run 'tim@MyComputer 2008-02-11 10:33:11': Test Run deployment issue: The location of the file or directory 'c:\nettiers\adventureworks\adventureworks.unittests\bin\debug\Microsoft.Practices.ObjectBuilder.dll' is not trusted.
 
The application is .NetTiers generated app (pointing .nettiers to the Adventureworks db - Microsoft's SQL Server sample database).
 
I believe the problem is a bug with .Net's security, because whenever I did an 'Evaluate Assembly...' within the '.Net Framework 2.0 Configuration' tool, it said that the assembly was unrestricted.
 
I think the problem is caused because .NetTiers used it's own version of the Enterprise Library 3.1 assembly (Microsoft.Practices.ObjectBuilder.dll) - ie not built locally.  To resolve, I replaced all the entprise library assemblies in both the .NetTiers directory (C:\netTiers2.2.0\References\EntLibv3_1) and the generated application reference dir (C:\NetTiers\AdventureWorks\References) with the ones that are created at the end of the enterprise library install (when it asks you if you want to build the assemblies).  Then I just needed to rebuild my Adventureworks solution in VS2008 - and bingo - the tests ran without the trust error (although many did fail ;-) )
Posted on Monday, February 11, 2008 1:58 AM C# .NET , ASP.NET | Back to top


Comments on this post: cannot run unit tests in VS2008 - Test Run deployment issue: The location of the file or directory is not trusted.

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net