Hello, dear c-sharpers! I am new in the language. Recently started a new project but after rearranging my file system I moved the project folder and already can't start the project. After all day searching in the web for solution I didn't find anything to help me or to explain to me what happened. Even if I delete my project and pull it from my github it still gives the same error what's annoying me most, as a new project pulled from the github should work at any path!? What am I missing?
Actually the error message that appears is the following:
Error NETSDK1045 The current .NET SDK does not support targeting .NET 6.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 6.0. 3dhi C:\Program Files\dotnet\sdk\5.0.414\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 141
Uttam KumarPosted Nov 16, 2022, 3:37 AM
Hi, from the message it seems it's a compatibility issue. You have two options
1. update sdk to 6.0. You can find sdk installation file in thin link
https://dotnet.microsoft.com/en-us/download/dotnet/6.0
2. Lower the version by Right-click on solution in Solution Explorer -> click on properties and change the version from 6.0 to 5.0 or lower.