2010-07-03 120 views
5

我已经安装了2010年4月份的Silverlight 4 Toolkit,并且安装了VS 2010 RTM,但未安装Silverlight 4单元测试项目模板。Silverlight 4单元测试

此版本的默认设置是?如果是这样,我该如何使用SL4单元测试?

谢谢。

回答

4

解决方案: The Silverli ght 4 Toolkit安装程序将Silverlight单元测试 的项目模板和项目模板放置在c:/ program files/microsoft visual studio 10.0/common7/ide中,而不管您的实际VS2010安装根目录。

结果是,如果您的VS2010安装没有使用默认的c:/ program files/microsoft visual studio 10.0/..., ,SL4安装后,项目和项目模板将出现错误的位置。

的修复将是:

 
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 

现在,当你在VS2010中打开一个新项目,你应该看到 的“Silverlight的单元测试应用程序”郎/ Silverlight中的“已安装选项卡?模板“部分。

希望这会有所帮助,

+0

一个常见的情况:64位操作系统...“程序文件(x86)”与“程序文件”。 – jv42 2011-08-09 13:29:18

+0

嗨...您的“安装路径”是什么意思? – NestorArturo 2011-08-16 21:42:25

+0

“devenv/installvstemplates”是他们失踪的关键。谢谢。 – 2013-01-17 21:24:35

1

您是否还安装了Silverlight 4工具?这不包含在VS 2010 RTM中。

我的安装顺序: -

在模板我看到一个 “Silverlight的单元测试中的应用”

+0

我已经安装了“适用于Visual Studio 2010的Microsoft Silverlight 4工具”。是这个吗? – mrtaikandi 2010-07-12 08:50:16

+1

安装“工具”绝对不足以获得“Silverlight单元测试应用程序”项目类型,您还必须安装“工具包”,这是不同的。 – 2011-03-08 16:10:43