Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Messages;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -126,7 +127,17 @@ where sol.SolutionId.Equals(solutionId)
if (webResource.Content?.GetHashCode() != fileContent.GetHashCode())
{
webResource.Content = fileContent;
context.UpdateObject(webResource);
//context.UpdateObject(webResource);

// update web resource then add to a solution.
UpdateRequest update = new UpdateRequest
{
Target = webResource
};
update.Parameters.Add("SolutionUniqueName", SolutionName);

context.Execute(update);

// add id to publish xml
if (Publish)
importexportxml.Append($"<webresource>{webResource.Id}</webresource>");
Expand Down