Artur Keyan
Artur Keyan

Reputation: 7683

Run outputType library project

I have an ASP.NET project with outputType library, I need to run the project but it's not running. what outputType should i use to make my project run?

Upvotes: 2

Views: 4640

Answers (4)

alex.b
alex.b

Reputation: 4567

Despite ASP.NET projects have Class Library type, Visual Studio can "run" these types of projects(it deploys project's output to IIS or dev server and starts web-app).

So to solve your problem you should tell Visual Studio somehow that your project is ASP.NET project. I see to ways:

1-st one - fast, straighforward, dumb, but reliable: create new "ASP.NET Web Application" project in visual studio and copy all sources to it.

2-nd - not sure that it's working, but more hack'ier and fun: open YourProject.csproj file in text editor, replace <ProjectTypeGuids ...> section by such ones, that could be found in csproj file of ASP.NET project.

Upvotes: 1

4b0
4b0

Reputation: 22323

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.Means
In VS.Net - right click on the page you want to be the initial startup page and set it to be the startup page.

Upvotes: 0

Software Engineer
Software Engineer

Reputation: 3956

Class library projects can not be run, you can debug them though. See Debugging DLL Projects

Upvotes: 0

huMpty duMpty
huMpty duMpty

Reputation: 14460

In order to fix the above error, right click the Solution name in Visual 
Studio 2005/2008 and select Set as StartUp Project option from the popup menu. 

source : Fix: A project with an Output type of Class Library cannot be started directly

Upvotes: 3

Related Questions