【转】关于编写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
【转】关于编写WPF UserControl时提示The name 'InitializeComponent' does not exist in the current contextr的解决!的更多相关文章
- WPF编译时提示“...不包含适合于入口点的静态‘Main’方法 ...”
今天看了一下wpf的Application类方面的知识,一个windows应用程序由一个Application类的实例表示,该类跟踪在应用程序中打开的所有窗口,决定何时关闭应用程序(属性 Shutdo ...
- WPF编译时提示"xxx不包含适合于入口点的静态 Main方法xxx"
WPF编译时提示"xxx不包含适合于入口点的静态 Main方法xxx"生成的时候一直报"xxx不包含适合于入口点的静态 Main 方法xxx" 看到这个问题首先 ...
- eclipse 编写scala代码时提示computing additional info
window->proference,把方框中那两个选项去掉不选,保存即可(或者只选择scala completions(java sources)),(只不过这么做之后就没有代码提示了)遇到这 ...
- 《OpenGL编程指南第七版》学习——编译时提示“error C2381: “exit” : 重定义;__declspec(noreturn) 不同”错误的解决办法
解决办法一. #if defined(_WIN32) # ifndef GLUT_BUILDING_LIBextern _CRTIMP void __cdecl exit(int); 上面是glut. ...
- Xshell连接linux(deepin)时提示ssh服务器拒绝了密码,请再试一次解决方法
用Xshell root连接时显示ssh服务器拒绝了密码,应该是应该是sshd的设置不允许root用户用密码远程登录 修改 /etc/ssh/sshd_config文件,注意,安装了openssh才会 ...
- 在Eclipse IDE进行Struts开发时提示错误:java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher的解决办法
If you have... included all necessary jars Configured build path correctly added them all in deploym ...
- 安装mysql时提示The host 'xxx' could not be looked up with resolveip的解决办法
1.首先用cat查看/etc/hosts文件,会显示以下内容: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.loca ...
- 连接mysql数据库时提示2003 can't connect to MySQL server on ip(10060)的解决办法
今天部署 JavaWeb 项目到云服务器,突然出现can t connect to MySQL server on ip的问题 经过了一些检查,认为很有可能是防火墙的原因.下面是检查的具体操作: 因为 ...
- vs 编译错误 The name 'InitializeComponent' does not exist in the current context in WPF application
1:文件命名空间的问题 xaml文件和model.cs文件的命名空间 2:csproj 那么它究竟是给谁用的呢?那是给开发工具用的,例如我们在熟悉不过的Visual Studio,以及大家可以没有接触 ...
随机推荐
- sprintf系列函数
1 简介和功能 字符串格式化命令,主要功能是把格式化的数据写入某个字符串中.sprintf 是个变参函数. 把格式化的数据写入某个字符串缓冲区. 2 函数原型 int sprintf( char *b ...
- 时间戳 js 转换
// 获取当前时间戳(以s为单位) var timestamp = Date.parse(new Date()); timestamp = timestamp / 1000; //当前时间戳为:140 ...
- Ruby主要方法
方法定义 def hello(name) ... end 函数名 参数 作用 备 ...
- 洛谷 - P2578 - 九数码游戏 - bfs
https://www.luogu.org/problemnew/show/P2578 一个挺搞的东西,用康托展开做记忆化搜索可以少一个log的查询. #include <bits/stdc++ ...
- 878. Nth Magical Number
A positive integer is magical if it is divisible by either A or B. Return the N-th magical number. ...
- bzoj 3998: [TJOI2015]弦论【SA+二分||SAM】
SA的话t==0直接预处理出每个后缀的不同串贡献二分即可,然后t==1就按字典序枚举后缀,然后跳右端点计算和当前后缀的前缀相同的子串个数,直到第k个 不过bzoj上会T #include<ios ...
- 仅用递归函数操作逆序一个栈(Swift 4)
/// 取出栈底的数 func getAndRemoveLastElement(_ items: inout [Int]) -> Int { let value = items.remove(a ...
- 注册jdbc驱动的三种方式
java.sql.DriverManger类简介 java的驱动管理类.管理一组 JDBC 驱动程序. javax.sql.DataSource 接口是 JDBC 2.0 API 中的新增内容,它 ...
- Oracle JDK各版本下载地址记录
Oracle JDK各版本下载地址: https://www.oracle.com/technetwork/java/javase/archive-139210.html
- 7.1 Java集合概述
List 有序.重复的集合 Set 无序.不可重复的集合 Map 具有映射关系的集合 jdk1.5之后.Java增加了Queue体系集合,代表一种队列集合实现