Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight 4 Unit Testing

I've installed Silverlight 4 Toolkit April 2010 and have VS 2010 RTM but Silverlight 4 Unit Test Project template is not installed.

Is it by default for this release? If so, how can I use SL4 unit testing?

Thanks.

like image 540
mrtaikandi Avatar asked Jul 03 '10 09:07

mrtaikandi


2 Answers

Solution: The Silverlight 4 Toolkit installer placed the item templates and project templates for the SilverLight Unit Test in c:/program files/microsoft visual studio 10.0/common7/ide, regardless of your actual VS2010 install root.

The upshot is that if your VS2010 installation did not use the default c:/program files/microsoft visual studio 10.0/..., the project and item templates would be in the wrong place after the SL4 install.

The fix would be :

1) Copy the corresponding .zip files 
   from c:\program files\...\common7\ide\... 
   to ?your installpath?\common7\ide\...

   Silverlight Unit Test Framework has templates for CSharp and VisualBasic.

   For example :
   common7\ide\itemtemplates\CSharp\silverlight\1033\Silverlight Unit Test Class.zip
   common7\ide\projecttemplates\CSharp\silverlight\1033\Silverlight Unit Test Project.zip

2) Use the VS command prompt to install the templates with the command :
   devenv /installvstemplates

Now, when you open a New Project in VS2010, you should see the "Silverlight Unit Test application" in the ?Lang?/Silverlight tab of the "Installed Templates" section.

Hope this helps,

like image 58
Kwee H Tan Avatar answered Oct 16 '22 00:10

Kwee H Tan


Have you also installed the Silverlight 4 Tools? This is not included in the VS 2010 RTM.

My install order:-

  • VS 2010
  • Silverlight Tools 4
  • Silverlight 4 Toolkit April 2010 (http://silverlight.codeplex.com/releases)

In templates I see a "Silverlight Unit Test Application"

like image 36
AnthonyWJones Avatar answered Oct 16 '22 00:10

AnthonyWJones