We have moved to GitHub Issues
Created by simone chiaretta 20 Jul 2017, 11:58:26 Updated by Jesse Andrews 12 Jun 2018, 22:05:25
When updating Umbraco using the nuget package directly, the
UmbracoFiles are updated correctly. However when the new nuget package version is stored in the
packages.config and restored on another machine, the various umbraco folders are not overwritten.
I've found the issue is in the
build\UmbracoCms.targets file. It is copying the files from the package only if they don't already exist (see
Condition="!Exists(...)" in the target file below.
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild"> <PropertyGroup> <UmbracoFilesFolder>$(MSBuildThisFileDirectory)..\UmbracoFiles\</UmbracoFilesFolder> </PropertyGroup> <ItemGroup> <UmbracoFiles Include="$(UmbracoFilesFolder)**\*" /> </ItemGroup> <Copy SourceFiles="%(UmbracoFiles.FullPath)" DestinationFiles="%(RecursiveDir)%(Filename)%(Extension)" Condition="!Exists('%(RecursiveDir)%(Filename)%(Extension)')" /> </Target>
This works on a fresh installation but not if you had installed Umbraco already and are just performing an upgrade using restore package as the old files will be there already.
I see a few possible solutions:
SkipUnchangedFilesof the [MsBuild copy task|https://msdn.microsoft.com/en-us/library/3e54c37h.aspx] which will check size and timestamp (this should make sure customized files are not changed)
I can do some tests and send a PR if needed.
Workaround is: just manually delete all affected folders before building after the update
I've run into this issue as well upgrading to 7.10.4.
Backwards Compatible: True
Affected versions: 7.6.1, 7.6.2, 7.6.3, 7.6.4
Due in version: