Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martin Rud 231 posts 901 karma points c-trib
    Dec 03, 2022 @ 11:01
    Martin Rud
    0

    Web deploy gives me error 'The current .NET SDK does not support targeting .NET 7.0....'

    Hi,

    When I publish my project in VS 2022 I get this error:

    The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0.
    

    I have .NET SDK 7 installed, both in x64 and x86 version: x64 x86

    And my project setup is targeted x86 and .NET 7:

    csproj pubxml

    What can I do to fix it?

  • Huw Reddick 1702 posts 5999 karma points MVP c-trib
    Dec 03, 2022 @ 13:39
    Huw Reddick
    0

    What version of Umbraco are you trying to deploy and what version of VS are you using?

    Umbraco 9 needs .Net 6.0 as does Umbraco 10, you only need .Net 7 for Umbraco 11

  • Martin Rud 231 posts 901 karma points c-trib
    Dec 03, 2022 @ 15:31
    Martin Rud
    0

    I am using VS 2022 and trying to deploy Umbraco 11.

  • Huw Reddick 1702 posts 5999 karma points MVP c-trib
    Dec 03, 2022 @ 15:45
    Huw Reddick
    100

    Everything looks OK, are you using the latest VS 2022? maybe check for updates just in case

  • Martin Rud 231 posts 901 karma points c-trib
    Dec 03, 2022 @ 18:56
    Martin Rud
    0

    Thanks - you are right. An upgrade solved the issue. :)

  • Carlos Casalicchio 169 posts 698 karma points
    Apr 05, 2023 @ 00:04
    Carlos Casalicchio
    0

    Issue started again with VS 17.5.3

    Also tried VS 17.6.0 Preview 2 and got the same issue

    Imgur

  • Huw Reddick 1702 posts 5999 karma points MVP c-trib
    Apr 05, 2023 @ 12:05
    Huw Reddick
    0

    At what point do you get this error?

  • Carlos Casalicchio 169 posts 698 karma points
    Apr 05, 2023 @ 14:21
    Carlos Casalicchio
    0

    I've just installed the new template

    dotnet new install Umbraco.Templates
    

    and created a new project using the template for 11.2.2 enter image description here

    and then I get the following error: enter image description here

    and it doesn't let me change the version:

    enter image description here

    The weird part is that I have a Umbraco v11.1.0 project with .net 7 and it works just fine! enter image description here

    The same thing happens when I clone down a Umbraco cloud project and try to upgrade it to Umbraco v11.

Please Sign in or register to post replies

Write your reply to:

Draft