The "GetSilverlightFramworkPath" task was not found. 以及类似情况的解决方案

来源:互联网 发布:直播nba的网络电视 编辑:程序博客网 时间:2024/06/05 17:24

曾在Visual studio2010上运行一个silverlight程序,出现下面异常。

The "GetSilverlightFramworkPath" task was not found. Check the following:1)The name of the task in the project file is the same as the name of the task class. 2.)The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.)The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET"。

哎,出现这个异常后,我是进行了各种尝试,但到最后发现才是silverlight版本不匹配。

关于我的这个程序的问题解决过程:

1. 首先编译程序后出现上边异常描述以及在配置文件中出现的情况(矩形红线圈标记,有蓝色波浪线)。

 

2. 出现上边异常后,在工程(project)属性中选择的silverlight版本不匹配或不存在所需的silverlight版本(程序所需的是Silverlight5版本),如下图展示(此图中展示了无Silverlight5版本这一情况)。

3. 若在Target Silverlight Version下拉菜单中有Silverlight5版本,直接选中即可。若无,则从

http://www.microsoft.com/zh-CN/download/details.aspx?id=28358中下载。(最好下载个与当前语言环境匹配)

4. 下载并安装后,在浏览project工程的属性,将会发现Silverlight5版本,如下图。

然后选择Silverlight5,保存并编译,即可通过。

原创粉丝点击