Running tests from Visual Studio 2010 Beta 2, TestDriven.Net 3, and xUnit.net returns a FileLoadException

UPDATE: This issue is now resolved in TestDriven.NET 3.0.2556 (http://testdriven.net/download.aspx). Thanks to Jaime Cansdale (@jcansdale) for fixing this issue so quickly.

When you try to run TestDriven.NET 3 in Visual Studio 2010 Beta 2 with xUnit.net, you might get the following exception:

------ Test started: Assembly: Mylibrary.Tests.dll ------

=== ERROR IN TEST RUNNER: xUnit.net 1.5 build 1479 ===
System.IO.FileLoadException: Could not load file or assembly 'file:///c:\users\jeff\documents\visual studio 2010\Projects\MyLibrary\Mylibrary.Tests\3rdParty\xunit\xunit.runner.tdnet.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///c:\users\jeff\documents\visual studio 2010\Projects\MyLibrary\Mylibrary.Tests\3rdParty\xunit\xunit.runner.tdnet.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

=================================================
It looks like you're trying to execute an xUnit.net unit test.

For xUnit 1.5 or above (recommended):
Please ensure that the directory containing your 'xunit.dll' reference also contains xUnit's
test runner files ('xunit.dll.tdnet', 'xunit.runner.tdnet.dll' etc.)

For earlier versions:
You need to install support for TestDriven.Net using xUnit's 'xunit.installer.exe' application.

You can find xUnit.net downloads and support here:
http://www.codeplex.com/xunit

To clear this issue up, you'll need to unblock the xunit reference dll's in the folder from which you're referenced them:

(do this for xunit.dll, xunit.dll.tdnet, and xunit.runner.tdnet.dll)

xunit.dll

Afterwards, you'll be able to successfully use TD.net again without this error. (I did not have the same issue with NUnit 2.4 however)


Posted by: Jeff
Posted on: 11/1/2009 at 11:21 PM
Categories: Testing | VS2010
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (17) | Post RSSRSS comment feed

Comments

topsy.com

Monday, November 02, 2009 7:04 PM

pingback

Pingback from topsy.com

Twitter Trackbacks for
        
        codingreflection.com | Running tests from Visual Studio 2010 Beta 2, TestDriven.Net 3, and xUnit.net returns a
        [codingreflection.com]
        on Topsy.com

uberVU - social comments

Tuesday, November 03, 2009 2:12 PM

trackback

Social comments and analytics for this post

This post was mentioned on Twitter by codereflection: Blogged: Running tests from Visual Studio 2010 Beta 2, TestDriven.Net 3, and xUnit.net returns a FileLoadException http://bit.ly/3g9l9J

qY20Jessica Canada

Monday, February 15, 2010 2:31 AM

qY20Jessica

I don't guess that each single student all over the world has got a passion of analytical essay writing! However, students ,which don't know how to write should take help of great <a href="quality-papers.com/.../sociology_essays">sociology essay</a> service and be satisfied with a success.

teeth whitening United States

Wednesday, February 17, 2010 9:24 AM

teeth whitening

There are three things that you should spend you time doing: Marketing, marketing, marketing.

dissertation United Kingdom

Tuesday, February 23, 2010 7:14 AM

dissertation

Thanks for posting! Its very helpful article nice and impressive. I like it, I have also bookmark it and will recommend it to many other peoples.

adipex generic United Kingdom

Saturday, April 03, 2010 2:09 PM

adipex generic

Thanks now I not have any problem with file loading.

Dissertation Writing United Kingdom

Saturday, April 03, 2010 6:20 PM

Dissertation Writing

Nicely, valuable and very informative post about "Running tests from Visual Studio 2010 Beta 2, TestDriven.Net 3, and xUnit.net returns a FileLoadException", Thanks.

free ringtones Canada

Sunday, April 04, 2010 7:17 PM

free ringtones

We do guess that the latest ringtones are available in the free ringtones providers and that’s truth.

planet jr planter United States

Thursday, April 08, 2010 3:43 PM

planet jr planter

I never knew that thanks

Biomass Global Climate Change United Kingdom

Friday, April 16, 2010 4:45 AM

Biomass Global Climate Change

Wow, this was a brilliant post. In theory I would like to write like this too. It takes time to creat that informative and additionally lots of effort to write a good article.

white noise maker Tajikistan

Friday, April 16, 2010 4:46 AM

white noise maker

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

budget insurance south africa United States

Sunday, April 18, 2010 1:51 PM

budget insurance south africa

Hi, I’ve been a lurker around your blog for a few months. I love this article and your entire site! Looking forward to reading more!

spraywhite United States

Tuesday, April 27, 2010 12:47 PM

spraywhite

Here is too much awesome things are shared here,I really satisfied form above information ,From many days, I was searching like that,now I caught all the inforamtion which I want,So thanks for sharingsuch article

Rapidshare United States

Tuesday, April 27, 2010 10:37 PM

Rapidshare

I\'m happy I found this blog, I couldnt discover any info on this subject matter prior to. I also run a site and if you want to ever serious in a little bit of guest writing for me if possible feel free to let me know, i\'m always look for people to check out my site. Please stop by and leave a comment sometime!

dollar stores People's Republic of China

Wednesday, April 28, 2010 8:28 AM

dollar stores

An antartian walks into a bar down south around Christmastime; and there’s a little nativity scene on the bar. And the guy says, “That’s a nice nativity scene. But how come the three wise men are wearing firemen’s hats?” And the bartender says, “Well, it says right there in the Bible…. The three wise men came from a fire.”

iphone United States

Thursday, April 29, 2010 7:41 PM

iphone

With the iSoniTalk, there’s no fumbling with difficult controls or searching for the correct button, because there’s only one! When you get an incoming call, simply press it to pause your music and take the call. When you’re done, press it again to hang up and resume your music.  The iSoniTalk can also be used to pause and play music even when you don’t have an incoming call, so it’s suitable for a quick conversation or time out when you need to take a break from your music. Take iPhone calls and listen to music with any headphones. Compatible with virtually all headphones so you can have better iPhone audio quality. Specifically designed to be compatible with iPhone recessed headphone jack. Easy one-button control lets you take calls and pause and play music. 24k gold mini-plug for optimal signal transfer and decay resistance.

Lenz Dietz United States

Wednesday, May 05, 2010 1:56 PM

Lenz Dietz

Highly clearly drafted article. I do not anticipated the following issue to be so vital. Thank you for the suggestion. With king regards, Lenz Dietz

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading