32 Replies Last post: Jan 8, 2011 12:33 PM by Matt Ross  
TATWORTH Newbie 23 posts since
Jul 24, 2008
Currently Being Moderated

Feb 8, 2010 11:46 AM

Unit Test Runner failed to load assembly

I have just upgraded to "ReSharperSetup.5.0.1611.9.msi" from "ReSharperSetup.5.0.1565.10.msi". Using Visual Studio 2010 Beta2, when I try to run unit tests, I get the following message:

Caption "ReSharper"

Body Text:

Unit Test Runner failed to load assembly.
Could not load file or assembly "Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture-neutral, PublicKeyToken='b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

 

I have rebooted the PC but the problem persists.

Once the Ok is clicked the tests do run as expected.

 

Also the tests run without issue in NCover.

 

y.png

martin  Newbie 26 posts since
Jun 21, 2005
Currently Being Moderated
Feb 9, 2010 3:32 PM in response to: TATWORTH
Re: Unit Test Runner failed to load assembly

I'm getting a similar one here using VS 2010 RC and Resharper ReSharperSetup.5.0.1612.115.

 

'Unit Test Runner failed to load test assembly:

JetBrains.Resharper.TaskRunnerFramework.TaskException: Access to the path 'System.Data.SQLite.DLL' is denied.

 

Cheers.

Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 9, 2010 4:55 PM in response to: martin
Re: Unit Test Runner failed to load assembly

Do you reference System.DataSQLite.dll in your tests?

martin  Newbie 26 posts since
Jun 21, 2005
Currently Being Moderated
Feb 9, 2010 5:10 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Yes I do.  This hasn't been a problem before however.

Tomas Ekeli Newbie 6 posts since
Nov 26, 2009
Currently Being Moderated
Feb 10, 2010 1:02 PM in response to: martin
Re: Unit Test Runner failed to load assembly

I am also seeing this error message when running tests referencing System.Data.SQLite.dll (v2.0.50727), with VS08 and R# 5 b5.0.1611.9 (no plugins)

 

Using the NUnit 2.5.3 runner provided with ReSharper.

 

The tests seem to run, though, and report success. Running the same tests with TestDriven.Net reports no problems.

Niclas Pehrsson Newbie 1 posts since
Feb 9, 2010
Currently Being Moderated
Feb 9, 2010 10:06 PM in response to: TATWORTH
Re: Unit Test Runner failed to load assembly

I am experiencing exactly the same error with Vs.NET 2010 RC Ultimate Edition.

 

But I'm getting the error that I can't load the assembly I'm testing. (running a vb.net solution).

Gauthier Segay Newbie 26 posts since
Feb 11, 2010
Currently Being Moderated
Feb 11, 2010 1:45 AM in response to: TATWORTH
Re: Unit Test Runner failed to load assembly

Same problem here with System.Data.SQLite v1.0.60.0 assembly

 

- vs 2008

- ReSharperSetup.5.0.1611.9

 

also encountering this from NUnit GUI runner with a less precise message

 

this works with NUnit console runner

Guest
Currently Being Moderated
Feb 12, 2010 11:26 PM in response to: Gauthier Segay
Re: Unit Test Runner failed to load assembly

Same thing - SQLite also & TestDriven.Net works perfectly. This started

breaking around build 1609 I think.

 

 

 

 

"Gauthier Segay" <no_reply@jetbrains.com> wrote in message

news:9066326.37421265841953029.JavaMail.clearspace@app8.labs.intellij.net...

Same problem here with System.Data.SQLite v1.0.60.0 assembly

>

- vs 2008

-

>

also encountering this from NUnit GUI runner with a less precise message

>

this works with NUnit console runner

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5256452#5256452

 

 

Nicholas Goodwin Newbie 6 posts since
Jan 19, 2010
Currently Being Moderated
Feb 16, 2010 5:45 PM in response to: Gauthier Segay
Re: Unit Test Runner failed to load assembly

Same version same problem here.  Was not an issue with the last build i had.

Guest
Currently Being Moderated
Feb 18, 2010 7:07 PM in response to: Nicholas Goodwin
Re: Unit Test Runner failed to load assembly

Has anyone seen a response from jet brains? This has been an issue for

awhile now

 

 

"Nicholas Goodwin" <no_reply@jetbrains.com> wrote in message

news:27796040.52071266331586659.JavaMail.clearspace@app8.labs.intellij.net...

Same version same problem here. Was not an issue with the last build i

had.

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5256794#5256794

 

 

Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 18, 2010 7:30 PM in response to: Berryl
Re: Unit Test Runner failed to load assembly

Don't worry, we know about this issue and working hard it resolve it.

Please be patient. You can help us by providing sample solution where it's reproduced always.

Guest
Currently Being Moderated
Feb 18, 2010 11:54 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Hi Victor

 

Thank you for the reply, but I'm afraid that the project that fails

consistently for me is too dependent on other libraries to be easily

transmitted. Is there no way for you to catch the error from the test runner

and transmit it to you via your bug reporting system (JIRA)?

 

Do you have any specific questions that I or someone in the group of users

anxious to see this fixed can answer?

 

Berryl

 

"Victor Kropp" <no_reply@jetbrains.com> wrote in message

news:659376.57361266510679307.JavaMail.clearspace@app8.labs.intellij.net...

Don't worry, we know about this issue and working hard it resolve it.

Please be patient. You can help us by providing sample solution where it's

reproduced always.

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5256921#5256921

 

 

Vlad B Newbie 4 posts since
Nov 30, 2009
Currently Being Moderated
Feb 20, 2010 2:10 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Here is a solution that fails (see attachment) possibly because of different version of NUnit

 

See UnitTests EngineFixture.cs and debug the only test there

Attachments:
Marcus Hammarberg Newbie 6 posts since
Feb 4, 2010
Currently Being Moderated
Feb 22, 2010 10:32 PM in response to: Vlad B
Re: Unit Test Runner failed to load assembly

Any progress on this?

 

It's very embarrissing when doing demos

 

Have I missed a solution in another thread?

/Marcus

Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 23, 2010 1:56 PM in response to: Vlad B
Re: Unit Test Runner failed to load assembly

Vlad, thanks for providing sample solution, but I wasn't able to reproduce failure on it using Win7 x64, VS2010 RC and latest R#. Test runs fine.

 

This seems to be dependent on environment. Could you provide some details on your environment, so I can find similar machine?

Vlad B Newbie 4 posts since
Nov 30, 2009
Currently Being Moderated
Feb 23, 2010 4:28 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Don't just run test, debug it!

 

I am on Win7 x64, VS2010 RC and latest R#

Attachments:
Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 23, 2010 4:34 PM in response to: Vlad B
Re: Unit Test Runner failed to load assembly

Unfortunately, it doesn't fail even in Debug.

Alexey Gorbach Newbie 11 posts since
Nov 23, 2009
Currently Being Moderated
Feb 24, 2010 6:40 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Hello!

I have such problem to . Here is my simple visual studio project with only one test. Please, take a look at it.

Thanks a lot !

Attachments:
Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 25, 2010 4:02 PM in response to: Alexey Gorbach
Re: Unit Test Runner failed to load assembly

Thanks everybody for help!

I've finally found and fixed this bug. This error message appeared due to race conditions in test run cleanup.

 

Please, check build 1625 tomorrow and let me know how it will go.

Alexey Gorbach Newbie 11 posts since
Nov 23, 2009
Currently Being Moderated
Feb 25, 2010 4:06 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Can't wait to download new build, and confirm it work !

Guest
Currently Being Moderated
Feb 26, 2010 9:36 AM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

Victor

 

You're on the right path; after installi build 1625 the project that was

failing for not being able to load SQLite seems to be in working order

again. BUT several dependent projects are still failing. Of course they all

work in nunit and TestDriven.Net as usual

 

Please stick with this one !!

 

 

"Victor Kropp" <no_reply@jetbrains.com> wrote in message

news:3095405.79001267102956566.JavaMail.clearspace@app8.labs.intellij.net...

Thanks everybody for help!

I've finally found and fixed this bug. This error message appeared due to

race conditions in test run cleanup.

>

Please, check build 1625 tomorrow and let me know how it will go.

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5257378#5257378

 

 

Marcus Hammarberg Newbie 6 posts since
Feb 4, 2010
Currently Being Moderated
Feb 26, 2010 7:52 PM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

That did the trick for me!

 

R# 5.0 (build 1625), Visual Studio 2010 RC and Windows 7 x64 was my plattform

 

Great work Victor!

/Marcus

Alexey Gorbach Newbie 11 posts since
Nov 23, 2009
Currently Being Moderated
Feb 26, 2010 8:09 PM in response to: Marcus Hammarberg
Re: Unit Test Runner failed to load assembly

And i have problem still.... Windows 7 x64, visual studio 2008 (Resharper Build 5.0.1625.127 on 2010-02-26T04:17:52).

Guest
Currently Being Moderated
Feb 26, 2010 9:40 PM in response to: Alexey Gorbach
Re: Unit Test Runner failed to load assembly

My env, still a problem, is also VS 2008 on x64 o/s

 

"Alexey Gorbach" <no_reply@jetbrains.com> wrote in message

news:30586523.83251267204185763.JavaMail.clearspace@app8.labs.intellij.net...

And i have problem still.... Windows 7 x64, visual studio 2008 (Resharper

Build 5.0.1625.127 on 2010-02-26T04:17:52).

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5257467#5257467

 

 

Victor Kropp JetBrains 112 posts since
May 6, 2009
Currently Being Moderated
Feb 23, 2010 1:59 PM in response to: Gauthier Segay
Re: Unit Test Runner failed to load assembly

If you are getting same error from NUnit, why you shouldn't get it from R# if they're using exactly the same engine?

 

Is your test assembly built for Any CPU/x86/x64? What OS do you have? Which versions of NUnit GUI and command-line have you run?

Guest
Currently Being Moderated
Feb 24, 2010 1:11 AM in response to: Victor Kropp
Re: Unit Test Runner failed to load assembly

My environment is x64 also, the failing project is compiled for x86.

 

 

"Victor Kropp" <no_reply@jetbrains.com> wrote in message

news:4169295.68081266922815068.JavaMail.clearspace@app8.labs.intellij.net...

If you are getting same error from NUnit, why you shouldn't get it from R#

if they're using exactly the same engine?

>

Is your test assembly built for Any CPU/x86/x64? What OS do you have?

Which versions of NUnit GUI and command-line have you run?

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5257170#5257170

 

 

Guest
Currently Being Moderated
Feb 24, 2010 8:53 PM in response to: TATWORTH
Re: Unit Test Runner failed to load assembly

Still a problem for me - am using VS 2008

 

 

"TATWORTH" <no_reply@jetbrains.com> wrote in message

news:6966968.73821267019787484.JavaMail.clearspace@app8.labs.intellij.net...

>I have now tried out ReSharper with VS2010 Ultimate RC on my home PC - the

>unit tests run without any problem.

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5257276#5257276

 

 

Tomas Ekeli Newbie 6 posts since
Nov 26, 2009
Currently Being Moderated
Mar 8, 2010 11:46 PM in response to: Berryl
Re: Unit Test Runner failed to load assembly

I think I may have stumbled upon the solution.

 

It seems that when installing SQLite it can include an entry in your machine.config file located in your .Net framework config folder: C:\Windows\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config

 

The final entry in this file on my machine was

<system.data><DbProviderFactories><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /></DbProviderFactories></system.data>

 

followed by the correct ending of the xml: </configuration>

 

Now, I don't know where this <systemt.data>...</system.data> belongs, but it's not in this file. Once I removed it from said machine.config -file the tests run (as they always have) and I get no error-dialogs.

 

Why don't you guys test it out on your systems, and if you have the same results we can put this little SNAFU at the SQLite installer's feet.

 

Remember to backup your machine.config before changing it, though, just in case

Guest
Currently Being Moderated
Mar 18, 2010 3:49 AM in response to: Tomas Ekeli
Re: Unit Test Runner failed to load assembly

I still have this in build 1639, although the problem has changed since

first identified!

 

Now, I can run the project (projectFoo) that has the reference to SQLite in

it, but if I run a dependent assembly, the Resharper Test Runner complains

that it was unable to load projectFoo or one of it's dependent assemblies.

 

Of course TestDriven.Net works without error as always, praise be ...

 

"Tomas Ekeli" <no_reply@jetbrains.com> wrote in message

news:16734691.109901268081227695.JavaMail.clearspace@app8.labs.intellij.net...

>I think I may have stumbled upon the solution.

>

It seems that when installing SQLite it can include an entry in your

machine.config file located in your .Net framework config folder:

C:\Windows\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config

>

The final entry in this file on my machine was

<system.data><DbProviderFactories><add name="SQLite Data Provider"

invariant="System.Data.SQLite" description=".Net Framework Data Provider

for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,

Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"

/></DbProviderFactories></system.data>

>

followed by the correct ending of the xml: </configuration>

>

Now, I don't know where this <systemt.data>...</system.data> belongs, but

it's not in this file. Once I removed it from said machine.config -file

the tests run (as they always have) and I get no error-dialogs.

>

Why don't you guys test it out on your systems, and if you have the same

results we can put this little SNAFU at the SQLite installer's feet.

>

Remember to backup your machine.config before changing it, though, just in

case

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5258087#5258087

 

 

Gauthier Segay Newbie 26 posts since
Feb 11, 2010
Currently Being Moderated
Mar 9, 2010 6:21 AM in response to: Gauthier Segay
Re: Unit Test Runner failed to load assembly

Update: I'm still reproducing the issue with

- resharper build 5.0.1631.45

- solution platform = AnyCPU in VS 2008

- vista business 64

Guest
Currently Being Moderated
Mar 18, 2010 7:35 PM in response to: Gauthier Segay
Re: Unit Test Runner failed to load assembly

Now, I can run the project (projectFoo) that has the reference to SQLite in

it, (I couldn't several weeks ago) but if I run a dependent assembly, the

Resharper Test Runner complains

that it was unable to load  an assembly in projectFoo

 

Of course TestDriven.Net works without error as always, praise be ...

 

- resharper build 5.0.1639.5

- solution platform = AnyCPU in VS 2008

- vista business 64

 

 

"Gauthier Segay" <no_reply@jetbrains.com> wrote in message

news:20387060.110851268104913615.JavaMail.clearspace@app8.labs.intellij.net...

Update: I'm still reproducing the issue with

- resharper build 5.0.1631.45

- solution platform = AnyCPU in VS 2008

- vista business 64

>

---

Original message URL:

http://www.jetbrains.net/devnet/message/5258101#5258101

 

 

Matt Ross Newbie 2 posts since
Nov 17, 2009
Currently Being Moderated
Jan 8, 2011 1:03 PM in response to: TATWORTH
Re: Unit Test Runner failed to load assembly

Was there every any solution to this issue?

 

I'm having the same problem.

 

Win7 Pro x64

VS2010

R#  5.1.1753.4 and I've even tried the latest nightly build 1764

NUnit 2.5.9

and I'm referencing SQLLite 3.6.3 but the x64 version in my Test project (using the S#arp Architecture framework)

 

I removed the reference to SqlLite from my test project, but I still get an error (the one mentioned in this thread) when running any tests through R#.

 

Have I missed a solution somewhere?

 

******************************EDIT ************************

 

Found the problem. I was referencing SharpArch.Testing.MbUnit.NHibernate.RepositoryTestsBase instead of SharpArch.Testing.NUnit.NHibernate.RepositoryTestsBase.

This caused the exception in R# Test Running.

More Like This

  • Retrieving data ...