After installing AgUnit in vs 2012 and R7 Silverlight unit tests are still recognized as MsTest tests and do not run

Mar 7, 2013 at 2:51 AM
I was using old AgUnit for silverlight in vs2010, now i moved to 2012 and got this issue.

Symptoms - when I run those tests test runner hangs. Nothing is going on, but test runner is running. if I click stop button all tests are marked as inconclusive and test runner stops.

When I hover mouse over test it shows Run MsTest test - should this be agunit?

In Resharper options Tools->Unit Testing -> there is no AgUnit (iirc it used to be in vs2010)

In Resharper options->Plugins it is present.

So basically can't run Sl tests. SL version is 4.0

Any help greatly appreciated.
Mar 7, 2013 at 10:25 AM
It's normal that AgUnit is no longer under Resharper options > Unit testing, we don't use a custom unit test provider anymore.
We now use the MSTest provider directly and hook into a later step of the unit test runner.

Make sure you have AgUnit 0.7. And make sure you have "Unblock"'d the .zip file or individual dll files.

Can you attach a screenshot of the Resharper options => Plugins screen with the details visible (click Show Details) ?

Also can you give the assembly versions of Microsoft.Silverlight.Testing.dll and Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll ?
I've seen people use the Silverlight 2 versions, which StatLight don't support anymore.

Attach a ReSharper log:

Start visual studio like this: devenv /ReSharper.LogFile "C:\resharper.log" /ReSharper.LogLevel Verbose
Do a test run.
You'll find the logfile in C:\resharper.log.
Mar 7, 2013 at 12:28 PM
Hey SDeKock

I am using Testing assemblies from SL 4.0 ToolKit.

Apparently they are those 2.0 versions you are talking about??

// Assembly Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version
[assembly: AssemblyVersion("")]

I tried to find something more fresh, but not SL5.0 cause as I say my application is SL4.0 and with testing assemblies from 5 toolkit it wouldnt build (i checked).

Are you saying that Silverlight 4.0 is now not supported? Or there is some workaround.. I am not yet ready to move to SL5.0

And also while another question, how would you integrate AgUnit with teamcity , if that is possible.
Thanks in advance
Mar 7, 2013 at 3:53 PM
You have to look at the FileVersion, not the AssemblyVersion. All Silverlight assemblies (SL2, SL3 and SL4) use as AssemblyVersion.
SL5 changed this to
You can find this version number by right clicking on the file in windows explorer > properties > details tab.
An example of this is 4.0.40413.2011.

StatLight is the framework AgUnit uses under the covers to run the actual unit tests.

Every version from Silverlight 3 and up is supported by StatLight, just not the Silverlight 2 version anymore.
U can get these Silverlight unit testing assemblies from NuGet or from: (this is the one for SL4).

Integration with TeamCity should be done with StatLight directly:
Mar 7, 2013 at 5:23 PM
Hm ok well then actual version I am currently using is from Toolkit 4.0 so it should be supposedly working just fine.

I will provide you details you asked for before about resharper log.. I would like to fix this asap though may I connect with you by skype maybe? my sn is:qteeth

Thanks in advance.
Mar 11, 2013 at 6:00 PM
Sorry, I don't have access to a headset ...

If you want I can connect through teamviewer and remotely assist.
Just let me know the time (+timezone) and teamviewer info.

You can reach me on Live Messenger or Google Talk with Or on Skype with sdekock, but again: no headset ... so chat only.
Mar 13, 2013 at 1:45 PM
For those interested, this was a problem with Code Contracts.
The checkbox for runtime checks needed to be enabled for the test project.
Jun 27, 2013 at 7:42 AM
Where is this checkbox that you talk about? I check on the project properties and cannot find anything like it.

best regards
Paulo Aboim Pinto