简体   繁体   中英

Xamarin-forms Visual Studio 2015 - Failing to debug app

I'm new to Xamarin. I am trying to debug my first Cross platform application but I keep getting the error in Visual Studio 2015

"A project with the Output Type Class Library cannot be started directly.

In order to debug this project, add an executable solution to this solution which references the library project. Set the executable project as the start up project. "

Any help on how to fix this?

In Visual Studio go to your Solution Explorer. Notice how one project is printed in bold and the other ones are not.

粗体印刷项目

This means that this project is te one that is going to be ran when you hit the debug button. In your case, a project which produces a DLL is selected as startup project. As you may know, a DLL cannot run by itself. Right-click the project you want to debug (so either your iOS, Droid or Windows project) and choose 'Set as startup project' from the menu.

设置为启动项目

You can also do this from the toolbar in the upperside of the screen. Next to the configuration dropdowns, you can also select which project should be the startup project.

Additionaly; if you right-click the solution file, you can select multiple startup projects at once.

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