Copied to clipboard

Flag this post as spam?

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


  • Jason Hinsley 7 posts 98 karma points
    Oct 10, 2019 @ 17:56
    Jason Hinsley
    0

    Setup Visual Studio for Existing Umbraco Site from repo on new development machine

    I have an umbraco site (v8) developed on another machine, in Visual Studio 2017. On the old machine I have usync & usync content installed.

    The site was running fine.

    Usync has been used to export the site and everything has been committed to a git repo.

    On my new laptop I have cloned the repo so have the code, including usync folder.

    I have created a new SQL server database named the same and created a user on that database with the same user.

    Web.config connection string is set (local host).

    When I CTRL+F5 to run the site from visual studio I get:

    Umbraco.Core.Exceptions.BootFailedException: Could not check the upgrade state.
    

    How do I get the site running locally on the new laptop? Do I need to backup / restore the database from my old machine?

    I was hoping I could get umbraco running and use usync to get everything back inline?

  • SteveV 54 posts 240 karma points
    Oct 12, 2019 @ 09:08
    SteveV
    0

    If Umbraco finds a connectionstring in the web.config it will assume a database and schema are setup. So remove the connectionstring, run the site and the install page should show up.

  • Jason Hinsley 7 posts 98 karma points
    Mar 15, 2020 @ 11:50
    Jason Hinsley
    0

    Ok, it's been a while but I'm now at a point where I need to sort this out.

    So, I have an umbraco solution made up of a .core project for custom code and a .web project for umbraco, source controlled in git.

    The project is using dll models builder.

    I have restored a copy of the production database and configured a user.

    The web.config for debug has a connection string to point to the local database with the correct user.

    Production environment is running as a appService in Azure.

    If I pull the repo to a new machine and build solution, the build fails due to the .core project making use of some of the umbraco models from the web project.

    As those models have not been generated yet (as umbraco is not running), the solution cannot compile.

    What is the best way to get this solution running locally, using the restored database?

    Thanks Jason

  • Jason Hinsley 7 posts 98 karma points
    Mar 15, 2020 @ 13:23
    Jason Hinsley
    0

    I have the site running locally, here are the steps taken:

    1. Pulled repo (will not build due to umbraco generated models missing)
    2. Downloaded wwwroot of production from Azure AppService using Kudu > Debug Console > CMD
    3. Copied bin folder from wwwroot (this has generated models) to bin folder of local .web project.
    4. Solution will now build successfully
    5. Restore production database locall
    6. Create login on sqlserver
    7. Create user on database, link to login.
    8. Run website

    The site is now running successfully, against the restored database.

    So my only question is: Is there a better way to deal with the missing generated umbraco models?

Please Sign in or register to post replies

Write your reply to:

Draft