简体   繁体   中英

Debugging C# application - Visual Studio

I am trying to learn C# and have followed the instructions in this tutorial

I have created a project, added the controls to the design surface and added code to the button click event. When I get to the part which asks me to test the application, I click "start debugging" and I get an error message saying

There were build errors, would you like to continue and run the last successful build?

If I click no, nothing happens. If I click yes I get another error saying:

Visual Studio cannot start debugging because the debug target 'C:\\Users\\hp\\source\\repos\\HelloWPFApp\\HelloWPFApp\\bin\\Debug\\HelloWPFApp.exe' is missing.

As a complete beginner I have no idea why this exe file is missing or how to fix it. Could someone point me in the right direction at all?

It's possible that your code has never compiled. Press Ctrl-Shift-B and try again (or look in the Build menu).

我现在没有VS,为什么不重建(或全部重建)您的项目,如果重建成功,则检查该文件夹中是否存在可执行文件,还检查发布文件夹(如果存在),然后更改重建据我记得,您会在工具栏上看到一个下拉菜单,

First: You should clean the project than Build project again.

Second: Run project by pressing F5

Executable file you can find in bin/Debug folder in your root of project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM