Copied to clipboard

Flag this post as spam?

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


  • bh 444 posts 1544 karma points
    Apr 17, 2023 @ 18:12
    bh
    0

    Duplicate v9 Site ?

    I need to duplicate a v9 Umbraco site in Visual Studio 2022. But, I have the latest Umbraco dotnet templates installed. Meaning I'm unable to spin up a blank v9 site using Visual Studio 2022. Any suggestions on how I can accomplish this?

    I tried this:

    dotnet new umbraco -p:v 9.3.1 -n myprojectname
    

    But, this did not create the *.sln file like I would expect.

  • JC 5 posts 76 karma points
    Apr 17, 2023 @ 19:17
    JC
    1

    I think you can use this to revert your templates -

    dotnet new install Umbraco.Templates::9.3.1
    
  • bh 444 posts 1544 karma points
    Apr 17, 2023 @ 19:56
    bh
    0

    @JC thanks for your reply.

    I ended up using VS 2022 to create a new blank solution. Then using CLI to create myprojectname project in my solution.

    dotnet new umbraco -p:v 9.3.1 -n myprojectname
    

    Then again using CLI I added the myprojectname project to my solution.

    dotnet sln myprojectname.sln add "C:\MYPATHHERE\myprojectname\myprojectname\myprojectname.csproj"
    

    Then I used nuget to install the necessary dependencies: umbraco.cms, umbraco.cms.sqlce, umbraco.sqlserverce, our.umbraco.gmaps

    I also had to change my TargetFramework. Here's how I did that: https://learn.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset?view=msvc-170

    With all of that and duplicating the requisite files from working v9 site...it's working now.

Please Sign in or register to post replies

Write your reply to:

Draft