Today, when generating a project, an error is generated, with the following errors: the current. NET SDK does not support targeting. NET Core 2.1. Either target. NET core 1.1 or lower, or use a version of the. NET SDK, which supports. NET Core 2.1. "
Use the latest visual studio2017 15.7.4.
I have four sub-versions of. NET Core 2.1.100, 2.1.103, 2.1.300, etc. installed on my computer:
See this you do not want to say, the installation is no problem ah, why still error. I was thinking the same thing!!
You are looking carefully, and then look carefully, is it clear what?
Right!
Right! Right!
Right! Right! Right!
Do not doubt, to believe that you are the best, the decision to be smart you must have seen why the installation is x64? x86 Why one didn't install it?
So
Then install it, what's that, huh?
Another toss, installed on the 2.1.103 (x86), 2.1.300 (x86) Two
Go back to the Visual studio2017 page, clean up the solution, and then F6
Hands in the chest crossed the cross, the mouth meditation "Amitabha", "God bless, must be successful AH";
PS: Now think about my brain is sick, painting what crosses, should not be hands together, eyes micro-closed, the mouth meditation "Amitabha".
Look at the "output" page constantly fanyong:
When I saw the last familiar and friendly picture, the heart was finally put down:
Build succeeded!
Build succeeded!
Build succeeded!
The important thing is that he's one or two or three or four times.
Well
To summarize:
The current. NET SDK does not support targeting. NET Core 2.1. Either target. NET Core 1.1 or lower, or use a version
This is because the system target environment is 32 for the. NET Core SDK, but only the 64-bit SDK is installed on the computer
If you encounter a similar error, just remember to check that the. NET core version installed on your computer is consistent with the target version of the system.
There is also the need to see whether the corresponding 32-bit or 64-bit. NET core SDK is installed on the system.
Microsoft Official. NET Core SDK and runtime download
VS2017 generated. NET Core Project error: the current. NET SDK does not targeting. NET Core 2.1. either