0

I want to build a Web API project in .NET Core and I am a complete beginner in .NET Core.

I have installed this .NET 7 SDK. I have Visual Studio 2019 and when I try to create a new project I don't see .NET Core 7 in target framework's dropdown.

I checked the control panel and it is showing :

enter image description here

enter image description here

I already have .NET core 2.1.802 and this is also shown in visual studio. But .NET 7 is not shown.

Did I download wrong version or does this SDK not contain .NET Core. I am a bit confused about it.

Can someone please explain this to me?

Thanks a lot.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
itachi
  • 13
  • 3
  • 6
    As far as I'm aware, VS 2019 can only support up to .NET 5. If you want to target .NET 6 or mater then you need VS 2022. – jmcilhinney Apr 30 '23 at 06:58
  • 2
    As detailed [here](https://learn.microsoft.com/en-us/answers/questions/620284/how-to-target-net-6-0-with-visual-studio-2019), you can force .NET 6 to work in VS 2019 but it's not a fully-featured experience and you can't select that target using the GUI you showed. .NET 7 is presumably a no better and possibly worse experience. Basically, you need to install VS 2022. You can still keep VS 2019 installed if you want, although there's probably little point in your having both. – jmcilhinney Apr 30 '23 at 07:02
  • @jmcilhinney: There can be reasons to have both - I've got a WiX installer project which isn't supported in VS2022, so I develop the app in VS2022 but have to keep VS2019 around for the installer :( At some point I really need to update it, but that's the sort of thing that can happen. – Jon Skeet Apr 30 '23 at 07:12
  • @JonSkeet, I agree that there can be reasons - I have both on my work machine. I suspect that there isn't a valid reason for this particular user though. I could be wrong though, hence I used "probably". – jmcilhinney Apr 30 '23 at 07:15

1 Answers1

2

Based on Visual Studio 2019 Support for .NET Development, Visual Studio 2019 supports the following .NET implementations:

  • .NET version 5 (Visual Studio 16.8 or later)
  • .NET Framework versions 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, and 4.0
  • .NET Core 3.1, 3.0, 2.2, 2.1, and 1.1.
  • .NET Native
  • Mono

So if you want to develop .NET 7 applications, install Visual Studio 2022.

Jiachen Li-MSFT
  • 320
  • 2
  • 8
  • 19