Skip to content

Commit

Permalink
[release/6.0.4xx-xcode14.2] Fixed remote and local build issues (#17971)
Browse files Browse the repository at this point in the history
- Updated Xamarin.Messaging to 1.9.99 to fix a connection problem in
remote builds because of an invalid reference to
System.Security.Cryptography.ProtectedData
- Generate Hot Restart specific build session id to fix an issue in
local builds that was conflicting with remote builds


Backport of #17964

---------

Co-authored-by: Mauro Agnoletti <[email protected]>
Co-authored-by: Emanuel Fernandez <[email protected]>
  • Loading branch information
3 people committed Apr 4, 2023
1 parent 178e83d commit 6ba6383
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion msbuild/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MessagingVersion>1.9.94</MessagingVersion>
<MessagingVersion>1.9.99</MessagingVersion>
<HotRestartVersion>1.0.93</HotRestartVersion>
</PropertyGroup>
</Project>
19 changes: 15 additions & 4 deletions msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets') And '$(MessagingBuildTargetsImported)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets') And '$(MessagingAppleTargetsImported)' != 'true'" />

<Target Name="_GenerateHotRestartBuildSessionId">
<GenerateBuildSessionId MessagingVersion="$(MessagingVersion)"
TargetFramework="$(TargetFramework)"
ProjectFullPath="$(MSBuildProjectFullPath)"
ProjectName="$(MSBuildProjectName)"
VisualStudioProcessId="$(VisualStudioProcessId)">
<Output TaskParameter="BuildSessionId" PropertyName="HotRestartBuildSessionId" />
<Output TaskParameter="BuildAppName" PropertyName="BuildAppName" />
</GenerateBuildSessionId>
</Target>

<Target Name="AddHotRestartDefineConstants" BeforeTargets="AddImplicitDefineConstants">
<PropertyGroup>
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
Expand Down Expand Up @@ -145,13 +156,13 @@
<Target Name="_CreateHotRestartCachedBundle" DependsOnTargets="$(_CreateHotRestartCachedBundleDependsOn)" />

<!-- Creates HotRestart app bundle and collects files to copy -->
<Target Name="_PrepareHotRestartAppBundle" DependsOnTargets="_GenerateBuildSessionId"
<Target Name="_PrepareHotRestartAppBundle" DependsOnTargets="_GenerateHotRestartBuildSessionId"
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsAppExtension)' == 'false' And '$(IsHotRestartBuild)' == 'true'">

<!--Create app bundle dir and get its path-->
<PrepareAppBundle
AppBundleName="$(_AppBundleName)"
SessionId="$(BuildSessionId)"
SessionId="$(HotRestartBuildSessionId)"
ShouldExtract="true">

<Output TaskParameter="AppBundlePath" PropertyName="HotRestartAppBundlePath" />
Expand Down Expand Up @@ -333,12 +344,12 @@
</CleanDependsOn>
</PropertyGroup>

<Target Name="_CleanHotRestartBundle" DependsOnTargets="_GenerateBuildSessionId" >
<Target Name="_CleanHotRestartBundle" DependsOnTargets="_GenerateHotRestartBuildSessionId" >
<!-- Gets the bundle path -->
<PrepareAppBundle
Condition="'$(IsHotRestartBuild)' == 'true'"
AppBundleName="$(_AppBundleName)"
SessionId="$(BuildSessionId)"
SessionId="$(HotRestartBuildSessionId)"
ShouldExtract="false">

<Output TaskParameter="AppBundlePath" PropertyName="HotRestartAppBundlePath" />
Expand Down

6 comments on commit 6ba6383

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: 6ba6383a4e49027112d4eefc2eb607ff48f02bd7 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: 6ba6383a4e49027112d4eefc2eb607ff48f02bd7 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ API diff for current PR / commit

NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

.NET (No breaking changes)
  • iOS: vsdrops gist (No breaking changes)
  • tvOS: (empty diff detected)
  • MacCatalyst: vsdrops gist (No breaking changes)
  • macOS: vsdrops gist (No breaking changes)
  • Microsoft.iOS vs Microsoft.MacCatalyst: vsdrops (could not create gist: file 'D:\a\1\s\change-detection\results\stable-api-comparison\diff\dotnet\iOS-MacCatalyst-diff\Microsoft.iOS.Ref\ref\net6.0\Microsoft.iOS.MacCatalyst.md' does not exist)

✅ Generator diff

Generator diff is empty

Pipeline on Agent
Hash: 6ba6383a4e49027112d4eefc2eb607ff48f02bd7 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-068.Ventura
Hash: 6ba6383a4e49027112d4eefc2eb607ff48f02bd7 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 1 tests failed, 76 tests passed.

Failures

❌ monotouch tests

1 tests failed, 10 tests passed.
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: Failed

Html Report (VSDrops) Download

Successes

⚠️ bcl: No tests selected. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ framework: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 4 tests passed. Html Report (VSDrops) Download
⚠️ install_source: No tests selected. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 40 tests passed. Html Report (VSDrops) Download
⚠️ mac_binding_project: No tests selected. Html Report (VSDrops) Download
⚠️ mmp: No tests selected. Html Report (VSDrops) Download
⚠️ mononative: No tests selected. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
⚠️ mtouch: No tests selected. Html Report (VSDrops) Download
⚠️ xammac: No tests selected. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 77 tests passed 🎉

Tests counts

⚠️ bcl: No tests selected. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ framework: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 4 tests passed. Html Report (VSDrops) Download
⚠️ install_source: No tests selected. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 40 tests passed. Html Report (VSDrops) Download
⚠️ mac_binding_project: No tests selected. Html Report (VSDrops) Download
⚠️ mmp: No tests selected. Html Report (VSDrops) Download
⚠️ mononative: No tests selected. Html Report (VSDrops) Download
✅ monotouch: All 11 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
⚠️ mtouch: No tests selected. Html Report (VSDrops) Download
⚠️ xammac: No tests selected. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.