Umbraco-CMS: Nuget restore not updating files

If a colleague upgrades umbraco, when I pull and restore nuget packages, updated /umbraco/* files are not overwritten.

This issue became apparent as a result of the Default.cshtml change causing a runtime error after upgrades. See: https://our.umbraco.com/forum/using-umbraco-and-getting-started/105442-upgraded-to-8121-now-get-umbracowebeditorsbackofficemodel-does-not-contain-a-definition-for-iconcheckdata

Umbraco version

from 8.12.0 to 8.12.2

Reproduction

Bug summary

I don’t know nuget package creation, but nuget restores don’t seem to overwrite files in the same way that updates do.

Steps to reproduce

  1. Create an 8.12.0 Umbraco site, and commit to git (location 1) excluding the umbraco folder
  2. Clone that repo in to a differ folder (location 2)
  3. Location 1: Upgrade Umbraco to 8.12.2 and push commit
  4. Location 2: Pull latest, restore packages.

Expected result

The contents of /Umbraco/Views/Default.cshtml should be identical

Actual result

/Umbraco/Views/Default.cshtml in Location 2 includes iconHelper code on line 124, while it has been removed in Location 1.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 24 (23 by maintainers)

Most upvoted comments

@drpeck you can included the umbraco folder and it’s contents using a wildcard in your csproj file

<Content Include="umbraco\**\*.*" />

I have just tested this on a project, and when I delete the contents of the umbraco folder it will get restored on build.

@nul800sebastiaan personally I don’t like the idea of source controlling more that 2800 files I am not going to change. I don’t want to review a PR containing a Umbraco upgrade.