How to convert Console App to class Library Project?

NALB 71 Reputation points
2023-04-11T14:04:43.5366667+00:00

Hello , I have a console App Project and I want to convert it to class Library in order to extract the dll and use it in another console app project .. How can I achieve that? I have tried to create console app folders and add them in the class Library project and copy all whatever inside main function in class library class function and i removed the bin and obj and sln from the project ... can you tell me how can I do that as it is not working for me or do you have another way to do so ? Thank you

Developer technologies | C#
{count} vote

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 78,086 Reputation points Volunteer Moderator
    2023-04-11T17:24:40.03+00:00

    in the project file change the output type to library:

      <OutputType>Library</OutputType>
    
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.