Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 624441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:12:04+00:00 2026-05-13T19:12:04+00:00

I’m currecntly developping a sample orders management solution using VB.NET 2008, NHibernate, FluentNHibernate and

  • 0

I’m currecntly developping a sample orders management solution using VB.NET 2008, NHibernate, FluentNHibernate and Linq for NHibernate.

On runtime, I get the following error:

Failed to queue test run […] Test run deployment issue : The location of the file or directory ‘C:\Open\Projects\Examples[..]\FluentNHibernate.dll’ is not trusted.

And I get the same with NHibernate.Linq.dll

Failed to queue test run […] Test run deployment issue : The location of the file or directory ‘C:\Open\Projects\Examples[..]\NHibernate.Linq.dll’ is not trusted.

Both assemblies are referenced into my tests project. It is only when trying to unit test my DAL that it has begun to do these tricky errors.

I have read something about running
“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol -machine -addgroup All_Code -url file://comdumap:/* FullTrust -n DevelopmentMappedDrive“
(it’s in French, but really just a few words easy to translate with Google Language Tools.)

I may provide you with any further helpful details if necessary. I don’t know much what could be useful, so I prefer waiting for your inquiries if any.

EDIT 1: I found another reference stating the error solution like this: Test Run Deployment Issue
It seems that after unblocking through Windows Explorer, this might allow these files to be deployed in order to perform the tests. Thus, I keep having this error and my tests won’t launch.

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:12:04+00:00Added an answer on May 13, 2026 at 7:12 pm

    Reposted as answer and elaborated.

    The fact that you’re running unit test code that fails because of untrusted location is a sign that you’re not doing unit testing, you’re doing integration testing. This is brittle and prone to other problems, so I would try to avoid doing that as much as possible.

    Unit testing should test small pieces of logic, units of code, like classes, methods, etc.

    The second you pull in code that does one of the following, you’re likely to have problems:

    • Code that requires a database
    • Code that requires a file (or file access)
    • Code that talks to some external system (like a COM object, a web service, anything over a network)

    For instance, what happens if:

    • You run the unit tests on your own machine, but at home? Do you have access to the same systems?
    • The database changes?
    • The database is moved to a different server to free up some space?
    • The disk is full?
    • The network is down, or having hickups?

    All of these things, and hundreds more, will cause your unit tests to fail, because not only are you testing the logic that sits on the other end of those connection paths, but you’re also testing that the connection path works.

    This causes your tests to be brittle, and prone to error.

    When a test fail, you will always want to say “ok, we must’ve done something to break the code”. You never want to hear this “argh, this test fails all the time, just leave it, it’s probably the server again”.

    The reason your unit tests fails related to your question is that because the code is required to talk to an outside system (file, database, web server, network device), it requires elevated trust. If it only runs normal code, it doesn’t require elevated trust, so your problem is a dead giveaway that you have such tests.

    These tests are called integration tests, because not only do they test code, but they test how well your code integrates with the outside world as well.

    I would try to remove those parts of the test, perhaps by refactoring them out, so that you can replace them with test systems in your unit tests.

    For instance:

    • If your code needs to write to a file, separate out the code to write to a file to a new class, in a method like WriteToFile, wrap the class in an interface, and give the object to the logic code as a parameter. Then, in your unit tests, create a new class implementing the same interface, but that just records that the method was called, and not try to write anything to a file. This way you can test that “the method that was supposed to write to a file was actually called with the right data”, and not “the file was successfully written”.

    For database and web servers and similar, you can do the same thing.

    Finally, note that of course at some point you might want to actually run tests that ensures the file actually ends up on disk. However, you should separate all those tests out into their own project so that if they break, you know it’s an integration test, all the unit tests should be able to run fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.