Unable to start debugging. The Silverlight developer runtime is not installed.

May 6, 2011 at 2:24 PM

I'm getting "Unable to start debugging. The Silverlight developer runtime is not installed. Please install a matching version" when I click debug silverlight unit tests.

What could be wrong here?

May 6, 2011 at 8:59 PM


You need the silverlight developer runtime for Silverlight 4 to run AgUnit.
It seems you don't have the developer runtime, or you have an outdated one.
You can try creating a new Silverlight 4 project. That should give you the same error when you try to debug it.

To developer runtime is normally installed as part of the Silveright 4 SDK or Tools.
You can also also install it separately: http://go.microsoft.com/fwlink/?LinkID=188039 

Feel free to contact me if you need more help.



May 6, 2011 at 9:01 PM

Oh, I forgot to add that you probably have to go to "Programs and Features" and uninstall "Microsoft Silverlight" if you have it.
This is the client runtime, the developer runtime replaces this. You can't install them side-by-side.

May 7, 2011 at 5:55 AM

Do you honestly think that I haven't tried updating silverlight/silverlight developer runtime/the silverlight 4 sdk?

I must have the developer runtime because I am opening silverlight solutions and I can debug them.

May 7, 2011 at 5:57 AM

Can the problem be the fact that I am using an NUnit port to the silverlight unit testing framework?

See here: http://code.google.com/p/nunit-silverlight/

May 7, 2011 at 7:28 AM

This error only comes up when you're debugging with the Silverlight end-user runtime.

Make sure that you can debug Silverlight applications with internet explorer, because that's what AgUnit uses behind the scenes.
I've seen situations where debugging with firefox/chrome/... etc works, and with internet explorer it doesn't.
The only solution was uninstalling and reinstalling the runtime in that case. 

And make sure you have a recent runtime for Silverlight 4.
Use http://www.microsoft.com/getsilverlight/ to see if you are up to date.

AgUnit also doesn't run tests using that NUnit framework. It only supports the MSTest framework from the Silverlight toolkit.
But this can't be the cause of this error.

May 8, 2011 at 8:23 AM

The NUnit framework is ported into the Silverlight Toolkit so there shouldn't be any problem. It even runs through the unit testing framework runner.

I did uninstall silverlight and installed it back and still, no luck.

Could this be because my unit testing library is an out of browser application?

May 8, 2011 at 3:25 PM

The NUnit framework works with the unit test runner from the toolkit. But it doesn't work with AgUnit.
The problem lies in the ReSharper plugin part of AgUnit, it does only detect the MSTest attributes on the tests so it won't find your NUnit tests. 

I don't have a clue why it is giving that error message though. I have never encountered it before unless the developer runtime was not installed.

Could you provide me with the versions of everything you are using (Visual studio, silverlight, silverlight toolkit, ReSharper, AgUnit) ?

May 8, 2011 at 5:40 PM

Visual Studio 2010 ultimate sp1, silverlight 4, the latest silverlight toolkit, resharper 5.1, AgUnit 0.2

The thing is that it shows the unit tests made with nunit when I run with AgUnit so I figured it should run.

May 8, 2011 at 5:57 PM

Can you be more specific about the resharper version ? 5.1.2 or 5.1.3 ?

The NUnit ReSharper plugin is picking up the tests. That's what you are seeing.

May 9, 2011 at 11:15 PM

Can you try the new 0.3 release of AgUnit ?

I'm not sure it will solve your issue, but it might help.

Jun 6, 2011 at 10:31 PM

Thought I would chime in on this thread. I too had the exact same error using AgUnit 0.3 with 5.1.3 and VS 2010. I found that as soon as removed nUnit for Silverlight and went with the MSTest framework it went away. 

However now I cannot get my tests to run at all. They either hang or they do not even start.  

Jun 6, 2011 at 10:33 PM

When turning on Exceptions I get the following: 

Method 'GetUnitTestAssembly' in type 'Microsoft.Silverlight.Testing.UnitTesting.Metadata.NUnit.NUnitProvider' from assembly 'NUnit.Silverlight.Metadata, Version=2010.11.1.0, Culture=neutral, PublicKeyToken=fe50801526d50c78' does not have an implementation.

Hope this helps.

Jun 7, 2011 at 9:37 AM

AgUnit uses an older version of the Silverlight unit testing framework from the toolkit internally to run the tests. Thats probably why you are seeing this error.
I'm already working on implementing a newer version.

Can you give me the link to where I can find the NUnit stuff ? 

Jun 7, 2011 at 4:48 PM

here is the link to the NUnit Silverlight project http://code.google.com/p/nunit-silverlight/

Jun 7, 2011 at 9:56 PM

Thank you, I'll try to support it in the next version.

Jun 7, 2011 at 10:32 PM

I finally got the NUnit part to work. It is supported by Resharper out of the box so I don't think you will need to add support for it. There is a trick though, every single reference in  your testing project must have Copy Local set to True. This includes System.Windows.

I dont know if adding support to your plugin could solve this problem or not. 

Jun 8, 2011 at 12:41 AM

@MHohlios How the hack does Resharper work with it out of the box?

I tested it and you are correct.

Jul 4, 2011 at 8:00 PM

If you do this, ReSharper will run the tests against the .NET desktop runtime instead of the Silverlight runtime.
It won't work in all cases, especially if you start doing UI testing.

The new version of AgUnit for R#6 will (hopefully) support NUnit, I'm trying to do my best to get it out ASAP.