none
Unable to Create .Net Project in Visual Studio 2017 with .Net Core 2.1 RRS feed

  • Question

  • I have Mircosoft Visual Studio Enterprise 2017 Version 15.9.11 and .Net Framework 4.7.02053.
    I have insatalled .Net Core SDK 2.1.603 and Runtime 2.1.10.
    Also I have insatalled AWS .Net SDK for Visual Studio 2017 as I need to build a AWS Lambda Application.
    When I try creating the application for AWS Lambda with Target Framework set as netcoreapp2.0 or netcoreapp2.1 
    I am getting error '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 that supports .NET Core 2.1.'.
    I googled around this issue and tried all the suggestions given but none of them have worked.
    Looking for a resolution for this issue.
    Monday, April 15, 2019 7:27 AM

All replies

  • Hi Santoshthakkar,

    Welcome to the MSDN forum,

    When did you meet this error? Open a new project or build it or publish it? Which blueprint template you chose?

    I tried to repro you issue in my side, the following I shown the version of .net core and SDK.

    Then I create and build the project, everything is fine. Maybe you can share the detail step about your issue.

    In general, error “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 that supports .NET Core 2.1.” indicates that MS has confused with multiple SDKs installed. could you please check the Use previews of the .NET Core SDK option here:-> Tools -> Options -> Projects and Solutions -> .NET Core note: sometimes you might need to restart your Visual Studio after checking the option.

    If not, please run command line: donet –info to see what you have installed on your machine at the moment. Then delete all old SDK folders (1.0 preview, 2.0, 2.1 except 2.1.402) out of this folder to a backup location and launch Visual Studio again.

    More, I found a similar thread which introduce other else workaround could be worthy to trying : https://stackoverflow.com/questions/49171623/the-current-net-sdk-does-not-support-targeting-net-core-2-1-target-net-core.

    or you could share us a demo to repro this issue again, if necessary, please upload it to https://onedrive.live.com/.

    Any feedback would be excepted.

    Best regards

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, April 16, 2019 4:05 AM
    Moderator
  • Hi friend,

    Is there any update for your issue? Or any confusion still not dismissing?

    If you solved this issue, please share us this workaround or mark the helpful reply as answer, then I will help you close this thread. Thank you for your cooperation!

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, April 18, 2019 7:54 AM
    Moderator