Copied to clipboard

Flag this post as spam?

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


  • Mads Justesen 11 posts 121 karma points
    Feb 02, 2022 @ 13:52
    Mads Justesen
    0

    Cant find Umbraco template in VS 2019

    Hej there

    I'm currently trying to install umbraco9 on my machine for the first time and I would like to be able to create the project through VS 2019. According to the guides found here https://our.umbraco.com/documentation/fundamentals/Setup/Install/install-umbraco-with-templates It should be a simple process however even though the templates shows up when I run the command "dotnet new --list" I'm still not able to create a Umbraco project through VS.

    Does anyone have any suggestion for why this might be happening ?

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Feb 02, 2022 @ 14:07
    Sebastiaan Janssen
    0

    I can't remember exactly, but it had something to do with the framework version I think, so if you have both .NET 5 and 6 installed then you need to install the templates per framework version, that should do the trick.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Feb 02, 2022 @ 14:12
    Sebastiaan Janssen
    100

    Ah here we go, I found what I did: https://discord.com/channels/869656431308189746/882984410432012360/894840372839219220

    Success!! I put a global.json file in a folder (careful, all descendants will be affected!) - did a dotnet --list-sdks to find the highest version of v5, which was 5.0.401 and added that to global.json:

    {
      "sdk": {
        "version": "5.0.401"
      }
    }
    

    Then dotnet --version didn't give me 6.0.100-rc.1.21463.6 any more but 5.0.401. Finally, I installed the templates (dotnet new -i Umbraco.Templates::*) and it did say they were a new install. Now in VS2019 the templates show up successfully as well! :thumbsup: As an added bonus they now also show up in Rider! :tada: Make sure to delete global.json again.

  • Mads Justesen 11 posts 121 karma points
    Feb 02, 2022 @ 14:29
    Mads Justesen
    0

    Thank you so much Sebastiaan that did the trick :)

Please Sign in or register to post replies

Write your reply to:

Draft