Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1453 posts 1874 karma points
    Feb 22, 2022 @ 15:23
    Gordon Saxby
    0

    Problem with CMSImport 9.0.0 and Umbraco 9.3.1

    I am using Visual Studio 2022. I installed Umbraco.CMS 9.0.0. Building and Rebuilding and running the site and opening Umbraco backend all worked fine.

    I installed CMSImport 9.3.0 which worked and Rebuild in Visual Studio worked.

    Then I updated to Umbraco.CMS 9.3.1 and now whenever I do a Rebuild the following folders are removed (and not replaced):

    /umbraco/config /umbraco/UmbracoBackOffice

    /umbraco/UmbracoInstall

    /umbraco/UmbracoWebsite

    After a lot of trial and error and thinking it was an Umbraco upgrade issue, I found that it appears to be the installation of CMSImport, at least when done as a Nuget package.

  • Richard Soeteman 4039 posts 12887 karma points MVP 2x
    Feb 22, 2022 @ 15:56
    Richard Soeteman
    0

    Hi Gordon,

    Don't know why that would happen. CMSImport only updates the app_plugins folder.

    Best,

    Richard

  • Gordon Saxby 1453 posts 1874 karma points
    Feb 22, 2022 @ 16:09
    Gordon Saxby
    0

    Hi Richard,

    I'm not sure now if it is Umbraco version related or not.

    The Rebuild output finishes like this with CMSImport installed:

    3>Clear old uSync Package data
    3>Clear old umbraco data
    3>Clear old Contentment package files
    3>Copying uSync files from package -> App_Plugins\uSync - #17 files
    3>Copying Umbraco content files: C:\Users\Gordon\.nuget\packages\umbraco.cms.staticassets\9.3.1\buildTransitive\..\content\umbraco\**\*.* - #47 files
    3>Copying Umbraco wwwroot content files: C:\Users\Gordon\.nuget\packages\umbraco.cms.staticassets\9.3.1\buildTransitive\..\content\wwwroot\umbraco\**\*.* - #2503 files
    3>MyWebsite -> C:\Development\Fifth Dimension\MyWebsite\trunk\MyWebsite\MyWebsite\bin\Debug\net6.0\MyWebsite.dll
    3>Copying Contentment package files: C:\Users\Gordon\.nuget\packages\our.umbraco.community.contentment\3.1.0\buildTransitive\..\content\App_Plugins\Contentment\**\*.* - #47 files
    3>Done building project "MyWebsite.csproj".
    

    But finishes like this with CMSImport installed:

    3>Clear old uSync Package data
    3>Clear old umbraco data
    3>Clear old Contentment package files
    3>Copying uSync files from package -> App_Plugins\uSync - #17 files
    3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5100,5): error MSB3030: Could not copy the file "C:\Development\Fifth Dimension\MyWebsite\trunk\MyWebsite\MyWebsite\umbraco\config\appsettings-schema.json" because it was not found.
    3>Done building project "MyWebsite.csproj" -- FAILED.
    

    I have tried installing CMSImport via the Nuget management page in Visual Studio, by calling "dotnet add package CMSImport" and every time it fails on Rebuild.

  • Kevin Jump 2317 posts 14746 karma points MVP 8x c-trib
    Feb 22, 2022 @ 16:17
    Kevin Jump
    0

    Hi

    I think this is an umbraco / vs studio issue with the .json file.

    I see that sometimes, but usually a rebuild then a second build will fix it.

    something internally (might be a dotnet core thing) doesn't like coping .json files in the target - but it only fails on a clean / rebuild - on a normal build its fine.

    (in general you shouldn't need to rebuild - these files are copied every build - so are fresh each time).

  • Gordon Saxby 1453 posts 1874 karma points
    Feb 22, 2022 @ 16:27
    Gordon Saxby
    0

    With CMSImport installed and referenced in the csproj file, doing a rebuild causes folders in \umbraco\ to be deleted, but they don't get reinstated.

    If I edit the csproj file and remove then do a Rebuild, the files are added back.

    As you say, it does appear that it's OK if I only use Build and not Rebuild.

    So, is it something in CMSImport that is causing the issue, I assume it must be?

  • Kevin Jump 2317 posts 14746 karma points MVP 8x c-trib
    Feb 22, 2022 @ 16:36
    Kevin Jump
    0

    I am not sure its a CMSImport thing.

    I have seen that error on clean installs, not quite sure of the exact circumstances that bring it about, but enough fiddling and rebuilding with no packages and you will occasionally see it.

  • Gordon Saxby 1453 posts 1874 karma points
    Feb 22, 2022 @ 16:49
    Gordon Saxby
    0

    OK. All I know is that doing a rebuild fails, but if I remove CMSImport from this in the csproj and do a Rebuild, the files come back. Doing a Build is OK.

      <ItemGroup>
        <PackageReference Include="CMSImport" Version="9.0.0" />
        <PackageReference Include="Our.Umbraco.Community.Contentment" Version="3.1.0" />
        <PackageReference Include="Umbraco.Cms" Version="9.3.1" />
      </ItemGroup>
    

    I guess I just need to remember not to use Rebuild!

  • Richard Soeteman 4039 posts 12887 karma points MVP 2x
    Feb 23, 2022 @ 06:58
    Richard Soeteman
    0

    Hi Gordon,

    I can confirm I did get a copy JSON error once but can't reproduce it 100% of the time and with different packages as well :-(

    Will keep checking.

    Best,

    Richard

  • Amalie Wowern 144 posts 273 karma points MVP c-trib
    May 02, 2022 @ 10:56
    Amalie Wowern
    0

    THANK YOU!

    I was so close to going crazy!

    I had the exact same error and i could not figure out what was happening.

    And i had done alot of difference things before i needed to go back in to the backoffice

    I can confirm that i helped me removing the package reference from csproj

Please Sign in or register to post replies

Write your reply to:

Draft