Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Messaging Build agent to .NET 8 #20705

Merged
merged 12 commits into from
Jun 24, 2024
2 changes: 1 addition & 1 deletion msbuild/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enclosed in brackets.

-->
<MessagingVersion>[1.14.6]</MessagingVersion>
<MessagingVersion>[99.11.28]</MessagingVersion>
<HotRestartVersion>[1.1.7]</HotRestartVersion>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)../Directory.Build.props" />
Expand Down
1 change: 1 addition & 0 deletions msbuild/ILMerge.targets
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.ComponentModel.Composition'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Diagnostics.Tracer'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Net.Mqtt'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Net.Mqtt.Server'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Reactive'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Security.Cryptography.ProtectedData'" />
<MergedAssemblies Include="@(ReferencePath)" Condition="'%(FileName)' == 'System.Text.Encoding.CodePages'" />
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ DOTNET_IOS_WINDOWS_OUTPUT_FILES = \
iSign.Core.pdb \
Xamarin.iOS.Windows.Client.pdb \
Broker.zip \
Build.zip \

DOTNET_IOS_WINDOWS_FILES = $(IOS_WINDOWS_TARGETS) $(foreach file,$(DOTNET_IOS_WINDOWS_OUTPUT_FILES),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/$(file))
DOTNET_IOS_WINDOWS_FILES += Messaging/Xamarin.Messaging.Build/obj/$(CONFIG)/Build.zip
DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X86 = $(foreach file,$(IOS_WINDOWS_MOBILEDEVICE_TOOLS),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/imobiledevice-x86/$(file).*)
DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64 = $(foreach file,$(IOS_WINDOWS_MOBILEDEVICE_TOOLS),Xamarin.iOS.Tasks.Windows/bin/$(CONFIG)/$(TARGETFRAMEWORK)/$(WINDOWSRUNTIMEIDENTIFIER)/imobiledevice-x64/$(file).*)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ protected override async Task ExecuteAsync (CopyItemMessage message)
message.SessionId,
PlatformPath.GetPathForCurrentPlatform (message.ItemSpec)));

if (File.Exists (targetPath))
if (File.Exists (targetPath)) {
File.Delete (targetPath);
else if (!Directory.Exists (Path.GetDirectoryName (targetPath)))
Directory.CreateDirectory (Path.GetDirectoryName (targetPath));
} else {
var directoryName = Path.GetDirectoryName (targetPath);
if (directoryName is not null && !Directory.Exists (directoryName))
Directory.CreateDirectory (directoryName);
}

using (var file = File.Create (targetPath))
using (var stream = new MemoryStream (message.Content))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<AssemblyName>Build</AssemblyName>
<NoWarn>$(NoWarn);NU1603</NoWarn> <!-- Xamarin.Messaging.Build.Common 1.6.24 depends on Merq (>= 1.1.0) but Merq 1.1.0 was not found. An approximate best match of Merq 1.1.4 was resolved. -->
Expand All @@ -10,6 +10,7 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<PropertyGroup Label="Messaging">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
<PackageReference Include="GitInfo" Version="2.2.0" ExcludeAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Messaging\Xamarin.Messaging.Build\Xamarin.Messaging.Build.csproj">
<ExcludeAssets>all</ExcludeAssets>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
<IsAgent>True</IsAgent>
</ProjectReference>
<ProjectReference Include="..\..\external\Xamarin.MacDev\Xamarin.MacDev\Xamarin.MacDev.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
Loading