VS2019 New Projects are limited to .Net Core

Jeremy Bradshaw 1 Reputation point
2021-03-21T13:14:36.247+00:00

I'm trying to add a WPF User Control Library to my existing .NET Framework 4.7 Winforms solution to add a little WPF Interoperability. The new project is defaulted to the target framework ".NET Core 3.1" and the only other options are ".NET Core 3.0" and ".NET 5.0". All the other projects in this solution are set to ".NET Framework 4.7" so I think that's why I'm having some issues. Can't I create a new project targeted to ".NET Framework 4.7" even if I can't change a .NET Core project to it? It's the same even if I create a new winforms project.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,812 questions
{count} votes

1 answer

Sort by: Most helpful
  1. DaisyTian-1203 11,631 Reputation points
    2021-03-22T03:20:20.237+00:00

    You should choose WPF User Control Library (.NET Framework) to create WPF User Control Library project which target platform is .NET Framework. In Visual Studio 2019 , it looks like below picture shown:
    80005-capture.png

    If you choose WPF User Control Library (.NET) , the new project will target .NET Core platform. It is not recommended to covert .NET Core to .NET Framework, but the reverse conversion is possible, for more details about it, you can refer to the blog: Migrating a Sample WPF App to .NET Core 3 (Part 1)


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.