不包含适用于入口点WPF的静态“Main”方法

编程入门 行业动态 更新时间:2024-10-27 21:24:10
本文介绍了不包含适用于入口点WPF的静态“Main”方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我删除了App.xaml文件并添加了名为App.cs的新类作为入口点。

I had deleted the App.xaml file and added new class named App.cs as the entry point.

class App : Application { [STAThread()] static void main() { } }

但是当我编译错误时显示:d:\Projects \ .... \obj\ x86 \Debug \ Test.exe不包含适用于入口点的静态Main方法。 如何解决这个问题?

But when i compile an error had shown: d:\Projects\....\obj\x86\Debug\Test.exe does not contain a static 'Main' method suitable for an entry point. How to solve this?

推荐答案

你不应该删除它。详情请见: www.wpf- tutorial/wpf-application/working-with-app-xaml/ [ ^ ] 如何创建新的: stackoverflow/questions/21891288/how-to-manually-create-an-app-xaml-file-in-a-wpf-python-project-in-visual-studio [ ^ ] You should not delete this. See details: www.wpf-tutorial/wpf-application/working-with-app-xaml/[^] How to create a new one: stackoverflow/questions/21891288/how-to-manually-create-an-app-xaml-file-in-a-wpf-python-project-in-visual-studio[^]

更多推荐

不包含适用于入口点WPF的静态“Main”方法

本文发布于:2023-11-15 12:37:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1594507.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适用于   静态   不包含   入口   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!