Third Shelf

Unit test deployment issue when file is untrusted

Posted in visual studio by Sydney du Plooy on April 5, 2010

Recently, I decided to use NHibernate in a project so that I could achieve database affinity. That provided me with another benefit and that was the ability to create a database in-memory for testing purposes. Sounded great, but while trying to run the unit tests using MsTest and SQLite, I received the following error: “Test Run deployment issue: The location of the file or directory ‘C:\projects\myproject\SQLite\sqlite3.dll’ is not trusted.“.

That problem was easily solved by simply unblocking the file. Below are the steps on how to unblock the file:

  1. Right-click the blocked file (sqlite3.dll), and then click Properties.
  2. This will open the properties dialog:
  3. In the General tab, click Unblock.
  4. Click on OK.

That’s it, the file is now trusted and the runtime should be able to load the file successfully.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 143 other followers