【转】关于编写WPF UserControl时提示The name 'InitializeComponent' does not exist in the current contextr的解决!

1、打开.csproj(工程)文件。

2、找到<Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />这一行

3、在这一行下面添加<Import Project="$(MSBuildBinPath)/Microsoft.WinFX.targets" />

4、保存文件。

 这时就可以编译通过了。

 

原文地址:http://blog.csdn.net/xiaoling9/article/details/1821305

posted @ 2014-03-11 15:39  qidong_kevin  阅读(243)  评论(0编辑  收藏  举报