Search code examples
c#projects-and-solutionsvisual-studio-2017target-framework

What determines what shows in the "Target framework" dropdown in Visual Studio?


I have two Visual Studio projects in separate solutions, and they're displaying different options for the target framework in the Application properties. This was difficult to screenshot since it was an open menu, so I apologize for the less-than-optimal resolution.

In one project, I had these options:

.Net Framework

And in another project (in another solution), I have these options:

.NetStandard

What is causing the change in available options? Both of these projects are running in Visual Studio 2017 RC, and both are on the same computer.


Solution

  • Well, that was easy...

    I realized the projects I was comparing weren't apples to apples, which led me to the solution. One project was a console application, and the other was a class library, but that wasn't what was causing issues.

    However, I went to create a new dummy project just to test if that was the issue when I realized I must have accidentally clicked on:

    Class Library (.NET Standard) - A project for creating a class library that targets .NET Standard.

    instead of:

    Class Library (.NET Framework) - A project for creating a C# class library (.dll)

    when I created the project.

    Frankly, I'm surprised I haven't made that mistake before now.