2010在Visual Studio中按F5构建但不启动应用程序 [英] Pressing F5 in Visual Studio 2010 Builds but does not Launch Application

查看:150
本文介绍了2010在Visual Studio中按F5构建但不启动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中单击一次应用程序(WPF)。最初,当我按F5调试/启动它工作顺利应用。最终,F5不仅会构建解决方案,而不是启动应用程序(因此我无法通过我的代码步骤)。一时间,我从调试切换到发布模式,由于某种原因,允许应用程序使用F5,我可以通过我的代码再次步骤后推出。但现在不再起作用无论是。长话短说,我不能去的方式,让我逐句通过代码运行应用程序。我只能做不调试(Ctrl + F5键)一个开始。显然,这并不为我做很多其他的不是告诉我,如果应用程序正常工作与否。

I have a Click Once application (WPF) in C#. Initially when I would hit F5 to debug/launch the application it worked smoothly. Eventually, F5 only would build the solution and not launch the application (therefore I could not step through my code). For a short while I switched from Debug to Release mode and for some reason that allowed the application to launch after using F5 and I could step through my code again. But now that no longer works either. Long story short, I cannot get the application to run in a manner that allows me to step through the code. I can only do a Start without Debugging (Ctrl + F5). Obviously this doesn't do much for me other than tell me if the application works or not.

推荐答案

您可能已经失去了你在解决方案中启动的项目,或启动项目搞砸了,并没有正确的项为启动定义。

You probably have lost your start up project in the solution, or the start up project is messed up, and no correct "item" is defined for the startup.

在你的项目中的一个右击,并选择:定义为启动项目。
然后重试应该做的伎俩。如果没有,请在该项目的属性,看是否有形式或某事的定义是该项目的启动对象。

Right click on one of your projects, and select : define as startup project. Then retry that should do the trick. If not, check in that projects properties to see if a form or something is defined as the startup object for that project.

编辑:显然不定义一个类库项目作为启动项目,而是选择你的UI :)。

Edit : Obviously dont define a class library project as startup project, but choose your UI :).

这篇关于2010在Visual Studio中按F5构建但不启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆