5

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.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
mrtaikandi
  • 6,753
  • 16
  • 62
  • 93

2 Answers2

4

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,

Kwee H Tan
  • 56
  • 3
1

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

My install order:-

In templates I see a "Silverlight Unit Test Application"

Michael Maddox
  • 12,331
  • 5
  • 38
  • 40
AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
  • I have installed "Microsoft Silverlight 4 Tools for Visual Studio 2010". Is this it? – mrtaikandi Jul 12 '10 at 08:50
  • 1
    Installing the "Tools" is definitely not enough to get the "Silverlight Unit Test Application" project type, you must also install the "Toolkit", which is different. – Michael Maddox Mar 08 '11 at 16:10