How do I set the "executable project as the startup project" in Visual Studio 2013 Express?
Asked Answered
G

2

22

So I am trying to study a sample application called ModernUIDemo.exe found in a zip file here. The website mentions the source code of the app can be found here.

After downloading, and pointing Visual Studio Express 2013 for Windows Desktop to the solutions file and trying to start without debugging, I get an error message:

A project with an Output Type of Class Library cannot be started directly.

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

I am assuming this means that there are multiple projects, and I need to set a startable project. So how do I do this?

I have been looking in the Application settings, where it lists "Startup objects" and it says FirstFloor.ModernUI.App.App. Isn't that correct?

Typically, how is documentation laid out in C# apps? Is there like a javadoc I have to generate for C#/XAML/WPF?

edit:

I am now getting some reference errors in the XAML to <mui:ModernTab and <mui:BBCodeBlock does not exist in XML namespace. Any clues? I already thought I added the dll file....

Gimbals answered 29/4, 2014 at 14:33 Comment(1)
It seems like you are trying to run a class library. A class library wouldn't have anything to run, it's meant to be used as part of another project. You need to create a project which uses the class library, then set it as the startup project by right-clicking the project name in Solution Explorer and selecting "Set as Startup Project."Budweis
E
23

In your project's property in Application tab you have to see:

enter image description here

Output type: Windows Application.

With this configuration after compilation you will get EXE file. Instead, according to the error message you get, your application is configured like Class Library, so output is DLL.

Esquiline answered 29/4, 2014 at 14:36 Comment(3)
So this fixed it, but now there are some reference errors specifically in XAML to <mui:ModernTab and <mui:BBCodeBlock does not exist in XML namespace?Gimbals
@user3525618: your project was not target for execution but for DLL, wich leads to some architectual changes. there may be more of them to execute, in order to run the program.Esquiline
I do not understand what you are saying. Can you explain it like I'm 5? :DGimbals
H
32

Right click on the project you want to run -> Set as start up project

Hamill answered 29/4, 2014 at 14:36 Comment(1)
Or select solution and set Startup project in "Properties" window.Sick
E
23

In your project's property in Application tab you have to see:

enter image description here

Output type: Windows Application.

With this configuration after compilation you will get EXE file. Instead, according to the error message you get, your application is configured like Class Library, so output is DLL.

Esquiline answered 29/4, 2014 at 14:36 Comment(3)
So this fixed it, but now there are some reference errors specifically in XAML to <mui:ModernTab and <mui:BBCodeBlock does not exist in XML namespace?Gimbals
@user3525618: your project was not target for execution but for DLL, wich leads to some architectual changes. there may be more of them to execute, in order to run the program.Esquiline
I do not understand what you are saying. Can you explain it like I'm 5? :DGimbals

© 2022 - 2024 — McMap. All rights reserved.