Skip to content

Commit c29b554

Browse files
[release/9.0.1xx] [xma] Updated Xamarin.Messaging to 3.0.13 (#21839)
Xamarin.Messaging major version 3 means the replacement of the underlying MQTT library used for message communication. We've replaced the System.Net.Mqtt with MQTTnet (repo under the dotnet org). More details here: xamarin/Xamarin.Messaging#818 For this reason, we also need to remove any System.Net.Mqtt reference from signing lists or ILMerge, and add MQTTnet instead. This PR also removes the System.Security.Cryptography.ProtectedData runtime implementation handling, since the new version used by Messaging (8.0.0) doesn't include a specific Windows runtime implementation, so we don't need to do this extra MSBuild handling to reference the right assemblies anymore Backport of #21767 --------- Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com> Co-authored-by: Mauro Agnoletti <maagno@microsoft.com>
1 parent dfd144f commit c29b554

6 files changed

Lines changed: 5 additions & 16 deletions

File tree

dotnet/Workloads/SignList.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
<Skip Include="tools\msbuild\iOS\ws2_32.dll" />
1717
<!-- Broker.zip -->
1818
<Skip Include="Broker\Newtonsoft.Json.dll" />
19-
<Skip Include="Broker\System.Net.Mqtt.dll" />
20-
<Skip Include="Broker\System.Net.Mqtt.Server.dll" />
19+
<Skip Include="Broker\MQTTnet.dll" />
2120
<Skip Include="Broker\System.Reactive.dll" />
2221
<Skip Include="Broker\System.Runtime.CompilerServices.Unsafe.dll" />
2322
<Skip Include="Broker\System.Security.Cryptography.ProtectedData.dll" />

msbuild/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
https://dev.azure.com/azure-public/vside/_artifacts/feed/xamarin-impl/NuGet/Xamarin.Messaging.Client/
1616
1717
-->
18-
<MessagingVersion Condition="'$(MessagingVersion)' == ''">[2.2.10]</MessagingVersion>
18+
<MessagingVersion Condition="'$(MessagingVersion)' == ''">[3.0.13]</MessagingVersion>
1919
<HotRestartVersion>[1.1.7]</HotRestartVersion>
2020
</PropertyGroup>
2121
<Import Project="$(MSBuildThisFileDirectory)../Directory.Build.props" />

msbuild/ILMerge.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.ComponentModel.Annotations'" />
4141
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.ComponentModel.Composition'" />
4242
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Diagnostics.Tracer'" />
43-
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Net.Mqtt'" />
44-
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Net.Mqtt.Server'" />
43+
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'MQTTnet'" />
4544
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Reactive'" />
4645
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
4746
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />

msbuild/Messaging/Xamarin.Messaging.Build/App.config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
1717
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
1818
</dependentAssembly>
19-
<dependentAssembly>
20-
<assemblyIdentity name="System.Net.Mqtt" publicKeyToken="ac60ebe5a5220e27" culture="neutral" />
21-
<bindingRedirect oldVersion="0.0.0.0-0.2.274.0" newVersion="0.2.274.0" />
22-
</dependentAssembly>
2319
</assemblyBinding>
2420
</runtime>
2521
</configuration>

msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Exec.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Xamarin.Messaging.Build.Client;
88
using System.Security;
99
using System.Reactive.Linq;
10+
using Xamarin.Messaging.Ssh;
1011

1112
// Disable until we get around to enable + fix any issues.
1213
#nullable disable

msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,15 @@
4848

4949
<Import Project="$(MSBuildThisFileDirectory)..\ILMerge.targets" />
5050

51-
<!-- Replaces the ProtectedData assembly by the runtime implementation -->
5251
<Target Name="CopyRuntimeAssemblies" BeforeTargets="ILRepack">
5352
<ItemGroup>
5453
<ReferenceCopyLocalToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />
55-
<ReferenceCopyLocalToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
56-
57-
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalToRemove)" />
58-
5954
<ReferencePathToRemove Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />
60-
<ReferencePathToRemove Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
6155

56+
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalToRemove)" />
6257
<ReferencePath Remove="@(ReferencePathToRemove)" />
6358

6459
<ReferencePathToAdd Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeIdentifier)' == 'win' And '%(FileName)' == 'System.Text.Encoding.CodePages'" />
65-
<ReferencePathToAdd Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeIdentifier)' == 'win' And '%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
6660

6761
<ReferencePath Include="@(ReferencePathToAdd)">
6862
<DestinationSubDirectory />

0 commit comments

Comments
 (0)