Skip to content

Commit cf69fe8

Browse files
authored
Merge pull request #150 from microsoft/release/update/210728055310
Sync update for Nuget Release 0.4.19
2 parents 73631b0 + a9b74e3 commit cf69fe8

8 files changed

+78
-19
lines changed

src/Build.Common.StandardAndLegacy.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
</PropertyGroup>
55

66
<PropertyGroup Condition="'$(TargetFrameworks)' == ''">
7-
<TargetFrameworks Condition="'$(OutputType)' == 'Exe'">netcoreapp3.1;net462</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(OutputType)' != 'Exe'">netstandard2.0;net462</TargetFrameworks>
7+
<TargetFrameworks Condition="'$(OutputType)' == 'Exe'">net5.0;net48;net462</TargetFrameworks>
8+
<TargetFrameworks Condition="'$(OutputType)' != 'Exe'">netstandard2.0;net48;net462</TargetFrameworks>
99
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1010
</PropertyGroup>
1111

src/Build.Shared.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<PackageVersion_MSAL>4.25.0</PackageVersion_MSAL>
88
<PackageVersion_CdsSdk>4.6.3291-weekly-2104.2</PackageVersion_CdsSdk>
99
<PackageVersion_CDSServerNuget>4.6.3291-weekly-2104.2</PackageVersion_CDSServerNuget>
10-
<PackageVersion_Newtonsoft>10.0.3</PackageVersion_Newtonsoft>
10+
<PackageVersion_Newtonsoft>11.0.2</PackageVersion_Newtonsoft>
1111
<PackageVersion_RestClientRuntime>2.3.20</PackageVersion_RestClientRuntime>
1212
<PackageVersion_XrmSdk>9.0.2.25</PackageVersion_XrmSdk>
13-
<PackageVersion_BatchedTelemetry>2.0.5</PackageVersion_BatchedTelemetry>
13+
<PackageVersion_BatchedTelemetry>2.0.11</PackageVersion_BatchedTelemetry>
1414
<!-- Test: -->
1515
<PackageVersion_Moq>4.16.0</PackageVersion_Moq>
1616
<PackageVersion_XUnit>2.4.1</PackageVersion_XUnit>

src/GeneralTools/DataverseClient/Client/ServiceClient.cs

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5482,15 +5482,49 @@ internal Guid ImportSolutionToImpl(string solutionPath, out Guid importId, bool
54825482
// Assign Tracking ID
54835483
Guid requestTrackingId = Guid.NewGuid();
54845484
SolutionImportRequest.RequestId = requestTrackingId;
5485-
// Creating Async Solution Import request.
5486-
ExecuteAsyncRequest req = new ExecuteAsyncRequest() { Request = SolutionImportRequest };
5487-
_logEntry.Log(string.Format(CultureInfo.InvariantCulture, "{1}Created Async ImportSolutionRequest : RequestID={0} ",
5488-
requestTrackingId.ToString(), solutionNameForLogging), TraceEventType.Verbose);
5489-
ExecuteAsyncResponse asyncResp = (ExecuteAsyncResponse)Command_Execute(req, solutionNameForLogging + "Executing Request for ImportSolutionToAsync : ");
5490-
if (asyncResp == null)
5491-
return Guid.Empty;
5485+
5486+
if (!isConnectedToOnPrem && Utilities.FeatureVersionMinimums.IsFeatureValidForEnviroment(ConnectedOrgVersion, Utilities.FeatureVersionMinimums.AllowImportSolutionAsyncV2))
5487+
{
5488+
// map import request to Async Model
5489+
ImportSolutionAsyncRequest asynImportRequest = new ImportSolutionAsyncRequest()
5490+
{
5491+
AsyncRibbonProcessing = SolutionImportRequest.AsyncRibbonProcessing,
5492+
ComponentParameters = SolutionImportRequest.ComponentParameters,
5493+
ConvertToManaged = SolutionImportRequest.ConvertToManaged,
5494+
CustomizationFile = SolutionImportRequest.CustomizationFile,
5495+
HoldingSolution = SolutionImportRequest.HoldingSolution,
5496+
LayerDesiredOrder = SolutionImportRequest.LayerDesiredOrder,
5497+
OverwriteUnmanagedCustomizations = SolutionImportRequest.OverwriteUnmanagedCustomizations,
5498+
Parameters = SolutionImportRequest.Parameters,
5499+
PublishWorkflows = SolutionImportRequest.PublishWorkflows,
5500+
RequestId = SolutionImportRequest.RequestId,
5501+
SkipProductUpdateDependencies = SolutionImportRequest.SkipProductUpdateDependencies,
5502+
SkipQueueRibbonJob = SolutionImportRequest.SkipQueueRibbonJob
5503+
};
5504+
5505+
// remove unsupported parameter from importsolutionasync request.
5506+
if (asynImportRequest.Parameters.ContainsKey("ImportJobId"))
5507+
asynImportRequest.Parameters.Remove("ImportJobId");
5508+
5509+
_logEntry.Log(string.Format(CultureInfo.InvariantCulture, "{1}Created Async ImportSolutionAsyncRequest : RequestID={0} ", requestTrackingId.ToString(), solutionNameForLogging), TraceEventType.Verbose);
5510+
ImportSolutionAsyncResponse asyncResp = (ImportSolutionAsyncResponse)Command_Execute(asynImportRequest, solutionNameForLogging + "Executing Request for ImportSolutionAsyncRequest : ");
5511+
if (asyncResp == null)
5512+
return Guid.Empty;
5513+
else
5514+
return asyncResp.AsyncOperationId;
5515+
}
54925516
else
5493-
return asyncResp.AsyncJobId;
5517+
{
5518+
// Creating Async Solution Import request.
5519+
ExecuteAsyncRequest req = new ExecuteAsyncRequest() { Request = SolutionImportRequest };
5520+
_logEntry.Log(string.Format(CultureInfo.InvariantCulture, "{1}Created Async ImportSolutionRequest : RequestID={0} ",
5521+
requestTrackingId.ToString(), solutionNameForLogging), TraceEventType.Verbose);
5522+
ExecuteAsyncResponse asyncResp = (ExecuteAsyncResponse)Command_Execute(req, solutionNameForLogging + "Executing Request for ImportSolutionToAsync : ");
5523+
if (asyncResp == null)
5524+
return Guid.Empty;
5525+
else
5526+
return asyncResp.AsyncJobId;
5527+
}
54945528
}
54955529
else
54965530
{

src/GeneralTools/DataverseClient/Client/Utils/Utils.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,14 @@ internal static ExpandoObject ToExpandoObject(Entity sourceEntity, MetadataUtili
383383
}
384384
else
385385
{
386-
if (value is EntityCollection)
386+
if (value is EntityCollection || value is Entity[])
387387
{
388+
if ( value is Entity[] v1s)
389+
{
390+
EntityCollection ec = new EntityCollection(((Entity[])value).ToList<Entity>());
391+
value = ec;
392+
}
393+
388394
// try to get the participation type id from the key.
389395
int PartyTypeId = PartyListHelper.GetParticipationtypeMasks(key);
390396
bool isActivityParty = PartyTypeId != -1; // if the partytypeID is -1 this is not a activity party collection.
@@ -399,7 +405,8 @@ internal static ExpandoObject ToExpandoObject(Entity sourceEntity, MetadataUtili
399405
if (isActivityParty)
400406
{
401407
var tempDict = ((IDictionary<string, object>)rslt);
402-
tempDict.Add("participationtypemask", PartyTypeId);
408+
if (!tempDict.ContainsKey("participationtypemask"))
409+
tempDict.Add("participationtypemask", PartyTypeId);
403410
partiesCollection.Add((ExpandoObject)tempDict);
404411
}
405412
}
@@ -819,6 +826,12 @@ internal static bool IsFeatureValidForEnviroment(Version instanceVersion, Versio
819826
/// </summary>
820827
internal static Version AllowTemplateSolutionImport = new Version("9.2.21013.00131");
821828

829+
/// <summary>
830+
/// Minimum version support for ImportSolutionAsync API.
831+
/// </summary>
832+
internal static Version AllowImportSolutionAsyncV2 = new Version("9.2.21013.00131");
833+
834+
822835
}
823836

824837

src/nuspecs/Microsoft.Dynamics.Sdk.Messages.ReleaseNotes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Notice:
66
https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages?view=dynamics-general-ce-9
77

88
++CURRENTRELEASEID++
9+
Updated Newtonsoft.Json to v11.0.2 to match server.
10+
11+
0.4.12:
912
Updated Dataverse Messages
1013

1114
0.4.11:

src/nuspecs/Microsoft.PowerPlatform.Dataverse.Client.Dynamics.ReleaseNotes.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Notice:
33
This package is intended to work with .net full framework 4.6.2, 4.7.2 and 4.8, .net core 3.0 and 3.1
44

55
++CURRENTRELEASEID++
6+
Updated Newtonsoft.Json to v11.0.2 to match server.
7+
8+
0.4.12:
69
Updated Dataverse Messages
710

811
0.4.11:

src/nuspecs/Microsoft.PowerPlatform.Dataverse.Client.ReleaseNotes.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Notice:
88
Note: that only OAuth, Certificate, ClientSecret Authentication types are supported at this time.
99

1010
++CURRENTRELEASEID++
11+
Updated behavior of ImportSolutionAsync to leverage updated Dataverse behavior post 9.2 release.
12+
Updated Display name for Northamerica 2 Region to reflect that it is more commonly know as GCC.
13+
Updated Newtonsoft.Json to v11.0.2 to match server.
14+
Fixed an issue with ActivityParty when using an Entity Array vs an EntityCollection for ActivityParties
15+
16+
0.4.12:
1117
Fixed an issue raised when updating some entities\attributes values to null.
1218
Fixed and issue with DataTime formatting for Timezone independent, Timezone specific, and 'normal' DateTime types.
1319
Update for Current Dataverse System Messages.

src/nuspecs/Microsoft.PowerPlatform.Dataverse.Client.nuspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
<dependency id="Microsoft.Extensions.Logging" version="3.1.8" exclude="Build,Analyzers" />
2121
<dependency id="Microsoft.Identity.Client" version="4.25.0" exclude="Build,Analyzers" />
2222
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" exclude="Build,Analyzers" />
23-
<dependency id="Newtonsoft.Json" version="10.0.3" exclude="Build,Analyzers" />
23+
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
2424
</group>
2525
<group targetFramework=".NETFramework4.7.2">
2626
<dependency id="Microsoft.Extensions.DependencyInjection" version="3.1.8" exclude="Build,Analyzers" />
2727
<dependency id="Microsoft.Extensions.Http" version="3.1.8" exclude="Build,Analyzers" />
2828
<dependency id="Microsoft.Extensions.Logging" version="3.1.8" exclude="Build,Analyzers" />
2929
<dependency id="Microsoft.Identity.Client" version="4.25.0" exclude="Build,Analyzers" />
3030
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" exclude="Build,Analyzers" />
31-
<dependency id="Newtonsoft.Json" version="10.0.3" exclude="Build,Analyzers" />
31+
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
3232
</group>
3333
<group targetFramework=".NETFramework4.8">
3434
<dependency id="Microsoft.Extensions.DependencyInjection" version="3.1.8" exclude="Build,Analyzers" />
3535
<dependency id="Microsoft.Extensions.Http" version="3.1.8" exclude="Build,Analyzers" />
3636
<dependency id="Microsoft.Extensions.Logging" version="3.1.8" exclude="Build,Analyzers" />
3737
<dependency id="Microsoft.Identity.Client" version="4.25.0" exclude="Build,Analyzers" />
3838
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" exclude="Build,Analyzers" />
39-
<dependency id="Newtonsoft.Json" version="10.0.3" exclude="Build,Analyzers" />
39+
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
4040
</group>
4141
<group targetFramework=".NETCoreApp3.0">
4242
<dependency id="System.Collections" version="4.3.0" exclude="Build,Analyzers" />
@@ -59,7 +59,7 @@
5959
<dependency id="Microsoft.Identity.Client" version="4.25.0" exclude="Build,Analyzers" />
6060
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" exclude="Build,Analyzers" />
6161
<dependency id="Microsoft.VisualBasic" version="10.3.0" exclude="Build,Analyzers" />
62-
<dependency id="Newtonsoft.Json" version="10.0.3" exclude="Build,Analyzers" />
62+
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
6363
<dependency id="System.Configuration.ConfigurationManager" version="4.7.0" exclude="Build,Analyzers" />
6464
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Build,Analyzers" />
6565
<dependency id="System.Security.Cryptography.Algorithms" version="4.3.1" exclude="Build,Analyzers" />
@@ -86,7 +86,7 @@
8686
<dependency id="Microsoft.Identity.Client" version="4.25.0" exclude="Build,Analyzers" />
8787
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.20" exclude="Build,Analyzers" />
8888
<dependency id="Microsoft.VisualBasic" version="10.3.0" exclude="Build,Analyzers" />
89-
<dependency id="Newtonsoft.Json" version="10.0.3" exclude="Build,Analyzers" />
89+
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
9090
<dependency id="System.Configuration.ConfigurationManager" version="4.7.0" exclude="Build,Analyzers" />
9191
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Build,Analyzers" />
9292
<dependency id="System.Security.Cryptography.Algorithms" version="4.3.1" exclude="Build,Analyzers" />

0 commit comments

Comments
 (0)