zlb

Silverlight 工程无法打开

一、问题1

用Blend处理了一下silverlight工程,保存后,新电脑环境上没有Blend程序,打开程序报错

无法读取项目文件“SLProject.csproj”。 C:\Users\xiaoxiangfeizi\Desktop\slMessage\SL1201\SLProject.csproj(128,3): 未找到导入的项目“C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets”。请确认 声明中的路径正确,且磁盘上存在该文件。

 

找到该工程的.csproj文件,用记事本打开后,找到

<Import Project="$(MSBuildExtensionsPath)/Microsoft/Expression/Blend/3.0/Silverlight

/Microsoft.Expression.Blend.Silverlight.targets" />

 

因为机器上没有Blend,所以就报错了。我把它删掉后重新打开工程,就没有可以了。

如果在别的环境中使用,而无法打开工程。就打开该文件找到相应的Import语句,把它删掉(即删掉有问题的语句)。

 

二、问题2

silverlight程序编译报错

silverlight The target "Build" does not exist in the project.

找到该工程的.csproj文件,用记事本打开后,找到

<Target Name="BeforeBuild">
  </Target>

在此节点的前面

添加

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />

posted on 2013-03-22 13:30  zlb  阅读(396)  评论(0编辑  收藏  举报

导航