博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C#项目关于HRMsys.exe”不包含适合于入口点的静态“Main”方法
阅读量:6929 次
发布时间:2019-06-27

本文共 3354 字,大约阅读时间需要 11 分钟。

做项目练习时,不小心删除了文件

又添加了APP.xaml,运行出现了HRMsys.exe”不包含适合于入口点的静态“Main”方法问题

和以前做过的项目做对比,程序的如果地址在App.xaml中,而运行出错的显然没有程序口地址

using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Linq;using System.Threading.Tasks;using System.Windows;namespace Customerapp{    ///     /// App.xaml 的交互逻辑    ///     public partial class App : Application    {    }}

  

APP 转到定义,两段代码对比,一切尽在不言中。

namespace HRMsys.UI {            ///     /// App    ///     public partial class App : System.Windows.Application, System.Windows.Markup.IComponentConnector {                private bool _contentLoaded;                ///         /// InitializeComponent        ///         [System.Diagnostics.DebuggerNonUserCodeAttribute()]        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]        public void InitializeComponent() {                        #line 4 "..\..\App.xaml"            this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);                        #line default            #line hidden            if (_contentLoaded) {                return;            }            _contentLoaded = true;            System.Uri resourceLocater = new System.Uri("/HRMsys;component/app.xaml", System.UriKind.Relative);                        #line 1 "..\..\App.xaml"            System.Windows.Application.LoadComponent(this, resourceLocater);                        #line default            #line hidden        }                [System.Diagnostics.DebuggerNonUserCodeAttribute()]        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {            this._contentLoaded = true;        }    }}

  

namespace Customerapp {            ///     /// App    ///     public partial class App : System.Windows.Application {                ///         /// InitializeComponent        ///         [System.Diagnostics.DebuggerNonUserCodeAttribute()]        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]        public void InitializeComponent() {                        #line 4 "..\..\App.xaml"            this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);                        #line default            #line hidden        }                ///         /// Application Entry Point.        ///         [System.STAThreadAttribute()]        [System.Diagnostics.DebuggerNonUserCodeAttribute()]        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]        public static void Main() {            Customerapp.App app = new Customerapp.App();            app.InitializeComponent();            app.Run();        }    }}

 

转载于:https://www.cnblogs.com/hellcats/p/4747113.html

你可能感兴趣的文章
烦死人的Vista和Longhron Server。
查看>>
C#多线程lock解决数据同步
查看>>
【新炬网络名师大讲堂】Using Baseline
查看>>
利用lk-reducer进行Linux内核审计监控文件访问
查看>>
《信息可视化:交互设计(原书第2版)》——2.8节多属性
查看>>
《SQL初学者指南(第2版)》——1.7 SQL的重要性
查看>>
小程序总结
查看>>
Android控件Gridview实现多个menu模块,可添加可删除
查看>>
我的友情链接
查看>>
Redis持久化实践及灾难恢复模拟
查看>>
SharedPreferences详解
查看>>
android 获取进程、服务、任务列表
查看>>
二叉树的遍历
查看>>
Script:收集自动SGA内存管理ASMM诊断信息
查看>>
2012年3月美国最佳虚拟主机提供商TOP12性能评测
查看>>
0-999以内的水仙花数
查看>>
基础之简单命令_1
查看>>
离线部署ELK+kafka日志管理系统
查看>>
所有windows系统快速建立用户解读
查看>>
我的友情链接
查看>>