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.
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.
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).
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.
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.
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.
Hi Gordon,
Don't know why that would happen. CMSImport only updates the app_plugins folder.
Best,
Richard
Hi Richard,
I'm not sure now if it is Umbraco version related or not.
The Rebuild output finishes like this with CMSImport installed:
But finishes like this with CMSImport installed:
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.
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).
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?
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.
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.
I guess I just need to remember not to use Rebuild!
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
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
is working on a reply...