one_loop
one_loop

Reputation: 23

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?

Upvotes: 0

Views: 135

Answers (1)

Gerald Versluis
Gerald Versluis

Reputation: 34013

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

Bold printed project

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.

Set as Startup project

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.

Upvotes: 1

Related Questions