diff --git a/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs b/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs index f2cc21d182..c6a4411a8c 100644 --- a/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs +++ b/Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectFiles.cs @@ -182,13 +182,6 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ } #endif - //Set Properties before Checkin - if (file.Properties != null && file.Properties.Any()) - { - Dictionary transformedProperties = file.Properties.ToDictionary(property => property.Key, property => parser.ParseString(property.Value)); - SetFileProperties(targetFile, transformedProperties, parser, false); - } - switch (file.Level) { case Model.FileLevel.Published: @@ -218,6 +211,12 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ { targetFile.ListItemAllFields.SetSecurity(parser, file.Security); } + + if (file.Properties != null && file.Properties.Any()) + { + Dictionary transformedProperties = file.Properties.ToDictionary(property => property.Key, property => parser.ParseString(property.Value)); + SetFileProperties(targetFile, transformedProperties, parser, false); + } } web = originalWeb; // restore context in case files are provisioned to the master page gallery #1059 @@ -377,4 +376,4 @@ private static File UploadFile(Microsoft.SharePoint.Client.Folder folder, Stream return targetFile; } } -} \ No newline at end of file +}