does not contain a static 'Main' method suitable for an entry point

在Visual Studio中删除App.xaml从别的位置拷贝一个后会出现的编译错误,原因在于

默认的App.xaml在属性页中的Build Action 是ApplicationDefinition,而拷贝过来的文件默认不是这样的。这个Build Action 会为我们生成所需的静态Main方法,这样程序就能够正确的被编译了。

WPF error: does not contain a static 'Main' method suitable for an entry point的更多相关文章

  1. WPF开发“Program '*' does not contain a static 'Main' method suitable for an entry point”错误

    WPF项目编译时出现“Program '*' does not contain a static 'Main' method suitable for an entry point”错误,   解决方 ...

  2. The main Method

    The main Method You can call static methods without having any objects. For example, you never const ...

  3. Error: Could not find or load main class test.EditFile

    今天写了一个简单的小程序,运行之后发现Error: Could not find or load main class test.EditFile,项目无法启动.删除main中的所有内容之后依旧提示该 ...

  4. [ERROR][org.springframework.web.context.ContextLoader][main] Context initialization failed org.sprin

    做一个SSH为基础框架的webapp小DEMO,复制了一把以前可以跑的代码,竟发现无法初始化数据源,报错如下: [ERROR][org.springframework.web.context.Cont ...

  5. Linux 下 Error: Could not find or load main class Hello

    在linux下写了一个很easy的Hello world程序,编译执行居然报错:Error: Could not find or load main class Hello 最后发现是CLASSPAT ...

  6. Error: Could not find or load main class Test

    问题描述 Linux 环境下运行 Java 程序时,执行 javac Test.java 生成 Test.class 文件,再执行 java Test 时报错:Error: Could not fin ...

  7. Sqoop找不到主类 Error: Could not find or load main class org.apache.sqoop.Sqoop

    最近由于要使用Sqoop来到出数据到hdfs,可是发现Sqoop1.4.5跟hadoop2.X不兼容,需要对Sqoop1.4.5进行编译,编译的具体方法见:http://my.codeweblog.c ...

  8. Android stdio 报错 error invoking main method

    打开Android stdio失败 报错:error invoking main method 想想前一天做了什么事?? 昨天把企图把Android Stdio文件包移盘,但是中途截止了,也就是说移动 ...

  9. [sloved] IDE JavaServlet "Error: Could not find or load main class Servlet"

    [ sloved ] JavaServlet "Error: Could not find or load main class Servlet" 报错内容: 提供一份 Servl ...

随机推荐

  1. Android 手机怎么录屏制成gif图片(电脑录制gif图)

    参考:http://www.cnblogs.com/dasusu/p/4903511.html 上面的博主说的很详细了,但作为学习记录我就重新写一遍帮助自己加深记忆 一.准备条件 1.你搭建了Andr ...

  2. 【转】一步一步带你反编译apk,并教你修改smali和重新打包

    一.工具介绍: 1.apktool:aapt.exe,apktool.bat,apktool.jar;三个在同一目录结合使用,用来反编译apk,apk重新打包: 2.dex2jar:该工具作用是将cl ...

  3. 最新番茄花园win7系统快速稳定版

    这是最新番茄花园win7系统64位快速稳定版 V2016年2月,该系统由系统妈整理和上传,系统具有更安全.更稳定.更人性化等特点.集成最常用的装机软件,集成最全面的硬件驱动,精心挑选的系统维护工具,加 ...

  4. 有状态的EJB对象和无状态的EJB对象

    一,定义有状态Bean和无状态Bean 有状态Bean: @Stateful @Remote public class StatefulEjbBean implements StatefulEjb{ ...

  5. 跳过权限检查,强制修改mysql密码

    windows: 1,停止MYSQL服务,CMD打开DOS窗口,输入 net stop mysql 2,在CMD命令行窗口,进入MYSQL安装目录 比如E:\Program Files\MySQL\M ...

  6. python 基础 7.1 datetime 获得时间

    一 datatime 的使用   object         timedeta         tzinfo         time         data                dat ...

  7. EasyPlayerPro windows播放器之多窗口播放音量控制方法

    EasyPlayerPro-win基础版本的音频播放为单一通道播放,即同一时间仅允许一个通道播放声音,现应客户需求,在基础版本上实现独立的音频播放,即每个通道可同时播放视频和音频; 设计思路 将音频播 ...

  8. 我的Android进阶之旅------>如何在多个LinearLayout中添加分隔线

    如果要适合于所有的Android版本,可以在多个LinearLayout放置用于显示分隔线的View.例如,放一个ImageView组件,然后将其背景设为分隔线的颜色或图像,分隔线View的定义代码如 ...

  9. js添加方法和邦定事件

    function(obj,objArr){ if(($(obj).attr("type") == "checkbox" && $j(obj).p ...

  10. re.sub用法

    re.sub功能是对于一个输入的字符串,利用正则表达式,来实现字符串替换处理的功能返回处理后的字符串 re.sub共有五个参数 三个必选参数pattern,repl,string 两个可选参数coun ...