Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - Error NETSDK1045: Does Not Recognize .NET Core 2.2
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error NETSDK1045: Does Not Recognize .NET Core 2.2

 Post Reply Post Reply
Author
code1ca View Drop Down
Newbie
Newbie


Joined: 26 December 2021
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote code1ca Quote  Post ReplyReply Direct Link To This Post Topic: Error NETSDK1045: Does Not Recognize .NET Core 2.2
    Posted: 26 December 2021 at 3:16pm
Hello All,

Wondering why my system is giving me the message: "Error NETSDK1045 The current .NET SDK does not support targeting .NET Core 2.2 ... use a version of the .NET SDK that supports .NET Core 2.2"

I put line numbers below for ease in illustrating where I'm coming from. From what I can tell based on the Package Manager Console (see line numbers 19, 23, 25 and 28 below) I have .NET Core 2.2, 
am I correct? If I already have .NET Core 2.2, then I wonder what am I missing that is preventing a successful program run?

To make sure I am not missing any detail in showing what I am seeing, I have uploaded the full tester solution to github shown in the link:

https://github.com/vlmbts/MVCcoreExploreCalifornia/commit/5ef856d8e497518553f641ad9df50a9c2b2db044

If I uninstall then reinstall things in a trial and error fashion hoping that somehow it can get fixed, I can actually do more harm than good, so I do not wish to pretend having significant experience 
installing Visual Studio and .NET Core 2.2; instead I'd like to ask the guidance of experts here who have more experience than I do in this area.
1 From Error List Window:
2 Error NETSDK1045 The current .NET SDK does not support targeting .NET Core 2.2.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2.
3
4 From Package Manager Console:
5
6 PM> dotnet --info
7 .NET SDK (reflecting any global.json):
8 Version:   6.0.101
9 Runtime Environment:
10 OS Name:     Windows
11 OS Version:  6.3.9600
12 OS Platform: Windows
13 RID:         win81-x64
14 Base Path:   C:\Program Files\dotnet\sdk\6.0.101\
15 Host (useful for support):
16   Version: 6.0.1
17 .NET SDKs installed:
18   2.1.526 [C:\Program Files\dotnet\sdk]
19   2.2.207 [C:\Program Files\dotnet\sdk]
20   6.0.101 [C:\Program Files\dotnet\sdk]
21 .NET runtimes installed:
22   Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
23   Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
24   Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
25   Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
26   Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
27   Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
28   Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
29   Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
30   Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.