Mo Gusbi
Mo Gusbi

Reputation: 297

Create a class library that targets asp.net 4.5 in Visual Studio 2015

Forgive if I am being incredibly dim, but how can I create a class library in Visual Studio that targets asp.net 4.5? As it stands, every time I add a new class library it defaults to DNX 1.0.0-beta5, which I don't want to use

For illustration purposes:
I create the initial MVC project targeting 4.5, which works absolutely fine
enter image description here

I then add a class library, again targeting 4.5
enter image description here

I then go look at it, and it's using .net 5 beta 5/DNX
enter image description here

Upvotes: 1

Views: 875

Answers (1)

Van Kichline
Van Kichline

Reputation: 1713

If you go to the top level of C# templates instead of C#/Node, you will see three different Class Library templates: "Class Library (Package)", "Class Library (Portable)", and just plain "Class Library." Choose "Class Library."

The Class Library (Package) template is intended for creating Nuget Packages. I will pass along the feedback that this is causing confusion.

Upvotes: 2

Related Questions