简体   繁体   中英

Visual Studio - 2019 Unable to Start Debugging

I am working with Unity.

While in Unity, I build my program. It's a very simple program. It's simply a cube that I placed on the screen.

I clicked build and a Visual Studios Solution was created.

I open up this solution in Visual Studios 2019 and I hit Start (there is no other option besides start).

This is what appears on my screen:

运行程序后的日志

点击开始后出现的错误消息

How can I get rid of the error message?

Edit:

I am trying to play with the Hololens emulator.

This post recommended not installing the tools for Unity when installing Visual Studio 2019, that's why I fid not do so.

Edit #2:

Here is an image from my entire solution from Visual Studio 2019.

在此处输入图片说明

Visual Studio solutions can have multiple projects inside of them. Each project generally produces a binary: an .exe, a .dll or a .lib file. If you look at the solution explorer (which you showed in your screenshot), you'll see those projects there. One of the projects will be bolded, and that is the project that is currently set as "Startup project". This is the project that Visual Studio will try to launch when you press F5 or "Start Debugging".

The reason you're getting this error is because your "Startup Project" is configured to be "Il2CppOutputProject". This project builds a .dll, and you cannot start a .dll.

To fix this, right click on "Chapter_2" project and select "Set this project as Startup Project" option. Now starting debugging should start working.

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