From 80cbdf04f56fc4d0f82475211538f681fc8243f2 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 27 Feb 2026 12:17:28 +0100 Subject: [PATCH 01/12] [tests] Fix Windows test summary always reporting 'All tests passed' (#24772) Fix a copy-paste bug in create-windows-html-report.cs where both the success and failure branches wrote '# :tada: All N tests passed :tada:'. The failure branch now generates a proper summary with
/## tags listing failed tests, matching the format TestResults.psm1 expects. Also fix TestResults.psm1 to emit
before ## (correct HTML nesting order), and avoid including misleading success-format file content in the failure section when the result file has no failure details. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../create-windows-html-report.cs | 35 +++++++++++++++++-- .../automation/scripts/TestResults.Tests.ps1 | 6 ++-- .../automation/scripts/TestResults.psm1 | 18 ++++++---- 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/scripts/create-windows-html-report/create-windows-html-report.cs b/scripts/create-windows-html-report/create-windows-html-report.cs index f17faa30308c..34e734a1b65b 100644 --- a/scripts/create-windows-html-report/create-windows-html-report.cs +++ b/scripts/create-windows-html-report/create-windows-html-report.cs @@ -85,6 +85,10 @@ public static int Main (string [] args) var indexContents = new StringBuilder (); var summaryContents = new StringBuilder (); + var allFailedTests = new List<(string TrxName, TrxParser.TrxTestResult Test)> (); + var failedTrxNames = new List (); + var passedTrxCount = 0; + var failedTrxCount = 0; indexContents.AppendLine ($""); indexContents.AppendLine ($""); @@ -123,9 +127,12 @@ public static int Main (string [] args) var name = trx.Name; var path = trx.TestResults; var messageLines = new List (); + var trxSucceeded = true; - if (TrxParser.TryParseTrxFile (path, out var failedTests, out var outcome, out allTestsSucceeded, out var ex)) { + if (TrxParser.TryParseTrxFile (path, out var failedTests, out var outcome, out trxSucceeded, out var ex)) { if (failedTests?.Any () == true) { + foreach (var ft in failedTests) + allFailedTests.Add ((name, ft)); messageLines.Add ("
    "); foreach (var ft in failedTests) { var testName = ft.Name; @@ -152,7 +159,15 @@ public static int Main (string [] args) outcome = "Failed to parse test results"; if (ex is not null) messageLines.Add ($"
    {FormatHtml (ex.ToString ())}
    "); + trxSucceeded = false; + } + + if (!trxSucceeded) { allTestsSucceeded = false; + failedTrxNames.Add (name); + failedTrxCount++; + } else { + passedTrxCount++; } try { @@ -194,7 +209,23 @@ public static int Main (string [] args) if (allTestsSucceeded) { summaryContents.AppendLine ($"# :tada: All {trxFiles.Length} tests passed :tada:"); } else { - summaryContents.AppendLine ($"# :tada: All {trxFiles.Length} tests passed :tada:"); + summaryContents.AppendLine ("# Test results"); + summaryContents.AppendLine ("
    "); + summaryContents.AppendLine ($"{failedTrxCount} tests failed, {passedTrxCount} tests passed."); + summaryContents.AppendLine (); + summaryContents.AppendLine ("## Failed tests"); + summaryContents.AppendLine (); + if (allFailedTests.Any ()) { + foreach (var (trxName, test) in allFailedTests) { + var msg = string.IsNullOrEmpty (test.Message) ? "" : $": {test.Message.Split ('\n') [0]}"; + summaryContents.AppendLine ($" * {trxName}/{test.Name}: {test.Outcome}{msg}"); + } + } else { + foreach (var trxName in failedTrxNames) { + summaryContents.AppendLine ($" * {trxName}: Failed"); + } + } + summaryContents.AppendLine ("
    "); } Directory.CreateDirectory (outputDirectory); diff --git a/tools/devops/automation/scripts/TestResults.Tests.ps1 b/tools/devops/automation/scripts/TestResults.Tests.ps1 index 6178bd86a398..1a27744780c7 100644 --- a/tools/devops/automation/scripts/TestResults.Tests.ps1 +++ b/tools/devops/automation/scripts/TestResults.Tests.ps1 @@ -908,8 +908,8 @@ Describe "TestResults tests" { ### :x: dotnettests tests (MacCatalyst) -5 tests failed, 6 tests passed.
    +5 tests failed, 6 tests passed.
    @@ -1002,9 +1002,9 @@ Describe "TestResults tests" { ### :x: dotnettests tests (MacCatalyst) -1 tests failed, 0 tests passed.
    -# :tada: All 5 tests passed :tada: +1 tests failed, 0 tests passed. +Test results reported success, but the tests job failed.
    [Html Report (VSDrops)](vsdropsIndex/testStagedotnettests_maccatalyst-1/;/tests/vsdrops_index.html) [Download](/_apis/build/builds//artifacts?artifactName=HtmlReport-testStagedotnettests_maccatalyst-1&api-version=6.0&`$format=zip) diff --git a/tools/devops/automation/scripts/TestResults.psm1 b/tools/devops/automation/scripts/TestResults.psm1 index 1e3693b374d2..97c23e6031be 100644 --- a/tools/devops/automation/scripts/TestResults.psm1 +++ b/tools/devops/automation/scripts/TestResults.psm1 @@ -447,17 +447,21 @@ class ParallelTestsResults { $resultLines = @("Test has no summary file.") } - if ($addSummary) { - $stringBuilder.AppendLine("$($result.Failed) tests failed, $($result.Passed) tests passed.") - } if ($addDetails) { $stringBuilder.AppendLine("
    ") } - if ($startLine -eq -1) { - $startLine = 0 + if ($addSummary) { + $stringBuilder.AppendLine("$($result.Failed) tests failed, $($result.Passed) tests passed.") } - for ($i = $startLine; $i -lt $resultLines.Length; $i++) { - $stringBuilder.AppendLine($resultLines[$i]) + if ($startLine -eq -1) { + # No
    , , or ## Failed tests found in the file. + # The file likely has the success format (e.g. "# :tada: All N tests passed :tada:"), + # which would be misleading in a failure section. Show a job failure message instead. + $stringBuilder.AppendLine("Test results reported success, but the tests job failed.") + } else { + for ($i = $startLine; $i -lt $resultLines.Length; $i++) { + $stringBuilder.AppendLine($resultLines[$i]) + } } if ($addDetails) { $stringBuilder.AppendLine("
    ") From 959fd9b2ad373e8716c2476cf9b32309535cedb0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 27 Feb 2026 12:18:41 +0100 Subject: [PATCH 02/12] [src] Fix memory leaks: release retained handles from Copy/Create native calls (#24794) All these native functions follow Apple's Create/Copy rule, returning retained handles that the caller must release. The handles were being passed to FromHandle/GetNSObject/ArrayFromHandle without specifying releaseHandle: true or owns: true, leaking the native objects. Also add tests for those APIs that were changed but didn't have tests already. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/AddressBook/ABAddressBook.cs | 4 +- src/AddressBook/ABMultiValue.cs | 4 +- src/AddressBook/ABPerson.cs | 12 +- src/AddressBook/ABRecord.cs | 6 +- src/CFNetwork/CFHTTPMessage.cs | 2 +- src/CoreFoundation/CFBundle.cs | 3 +- src/CoreFoundation/CFType.cs | 2 +- src/CoreGraphics/CGEvent.cs | 2 +- src/CoreMedia/CMTime.cs | 2 +- src/CoreText/CTFont.cs | 2 +- src/CoreVideo/CVPixelFormatDescription.cs | 2 +- src/MobileCoreServices/UTType.cs | 14 +-- .../AddressBook/AddressBookTest.cs | 10 ++ .../monotouch-test/AddressBook/PersonTest.cs | 108 ++++++++++++++++++ .../CoreFoundation/BundleTest.cs | 10 ++ .../CoreGraphics/CGEventTests.cs | 9 ++ .../CoreServices/HttpMessageTest.cs | 11 ++ tests/monotouch-test/CoreText/FontTest.cs | 10 ++ .../MobileCoreServices/UTTypeTest.cs | 30 +++++ 19 files changed, 215 insertions(+), 28 deletions(-) diff --git a/src/AddressBook/ABAddressBook.cs b/src/AddressBook/ABAddressBook.cs index df69a55807a3..5fde5ef1b33a 100644 --- a/src/AddressBook/ABAddressBook.cs +++ b/src/AddressBook/ABAddressBook.cs @@ -535,7 +535,7 @@ public ABGroup [] GetGroups (ABRecord source) if (label is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (label)); - string? result = CFString.FromHandle (ABAddressBookCopyLocalizedLabel (label.Handle)); + string? result = CFString.FromHandle (ABAddressBookCopyLocalizedLabel (label.Handle), true); GC.KeepAlive (label); return result; } @@ -754,7 +754,7 @@ public ABPerson [] GetPeopleWithName (string name) var h = ABAddressBookCopyDefaultSource (GetCheckedHandle ()); if (h == IntPtr.Zero) return null; - return new ABSource (h, this); + return new ABSource (h, true) { AddressBook = this }; } [DllImport (Constants.AddressBookLibrary)] diff --git a/src/AddressBook/ABMultiValue.cs b/src/AddressBook/ABMultiValue.cs index e6008b052e77..0bb23505893c 100644 --- a/src/AddressBook/ABMultiValue.cs +++ b/src/AddressBook/ABMultiValue.cs @@ -212,7 +212,7 @@ public T Value { public NSString? Label { get { AssertValid (); - return Runtime.GetNSObject (ABMultiValue.CopyLabelAtIndex (self.Handle, index)); + return Runtime.GetNSObject (ABMultiValue.CopyLabelAtIndex (self.Handle, index), true); } set { if (IsReadOnly) @@ -319,7 +319,7 @@ public ABPropertyType PropertyType { /// public T [] GetValues () { - return NSArray.ArrayFromHandle (ABMultiValue.CopyArrayOfAllValues (Handle), toManaged) + return NSArray.ArrayFromHandle (ABMultiValue.CopyArrayOfAllValues (Handle), toManaged, releaseHandle: true) ?? Array.Empty (); } diff --git a/src/AddressBook/ABPerson.cs b/src/AddressBook/ABPerson.cs index b9abcd6d0563..a25688241a3e 100644 --- a/src/AddressBook/ABPerson.cs +++ b/src/AddressBook/ABPerson.cs @@ -920,7 +920,7 @@ public int CompareTo (ABPerson other, ABPersonSortBy ordering) /// public static string? LocalizedPropertyName (ABPersonProperty property) { - return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (ABPersonPropertyId.ToId (property))); + return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (ABPersonPropertyId.ToId (property)), true); } /// A value that corresponds to one of the low-level kABPersonProperty fields. @@ -946,7 +946,7 @@ public int CompareTo (ABPerson other, ABPersonSortBy ordering) /// public static string? LocalizedPropertyName (int propertyId) { - return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (propertyId)); + return CFString.FromHandle (ABPersonCopyLocalizedPropertyName (propertyId), true); } [DllImport (Constants.AddressBookLibrary)] @@ -1014,7 +1014,7 @@ public static ABPropertyType GetPropertyType (int propertyId) /// /// public NSData? Image { - get { return Runtime.GetNSObject (ABPersonCopyImageData (Handle)); } + get { return Runtime.GetNSObject (ABPersonCopyImageData (Handle), true); } set { IntPtr error; unsafe { @@ -1744,7 +1744,7 @@ public void SetRelatedNames (ABMultiValue? value) public ABPerson? []? GetLinkedPeople () { var linked = ABPersonCopyArrayOfAllLinkedPeople (Handle); - return NSArray.ArrayFromHandle (linked, l => new ABPerson (l, null)); + return NSArray.ArrayFromHandle (linked, l => new ABPerson (l, null), releaseHandle: true); } [DllImport (Constants.AddressBookLibrary)] @@ -1756,7 +1756,7 @@ public void SetRelatedNames (ABMultiValue? value) /// To be added. public NSData? GetImage (ABPersonImageFormat format) { - return Runtime.GetNSObject (ABPersonCopyImageDataWithFormat (Handle, (nint) (long) format)); + return Runtime.GetNSObject (ABPersonCopyImageDataWithFormat (Handle, (nint) (long) format), true); } [DllImport (Constants.AddressBookLibrary)] @@ -1799,7 +1799,7 @@ public void SetRelatedNames (ABMultiValue? value) GC.KeepAlive (source); GC.KeepAlive (vCardData); - return NSArray.ArrayFromHandle (res, l => new ABPerson (l, null)); + return NSArray.ArrayFromHandle (res, l => new ABPerson (l, null), releaseHandle: true); } } diff --git a/src/AddressBook/ABRecord.cs b/src/AddressBook/ABRecord.cs index c579db02c202..3dfbceeb0488 100644 --- a/src/AddressBook/ABRecord.cs +++ b/src/AddressBook/ABRecord.cs @@ -182,7 +182,7 @@ public ABRecordType Type { /// public override string? ToString () { - return CFString.FromHandle (ABRecordCopyCompositeName (Handle)); + return CFString.FromHandle (ABRecordCopyCompositeName (Handle), true); } // TODO: Should SetValue/CopyValue/RemoveValue be public? @@ -238,12 +238,12 @@ internal void RemoveValue (int property) where T : NSObject { IntPtr value = CopyValue (id); - return (T?) Runtime.GetNSObject (value); + return (T?) Runtime.GetNSObject (value, true); } internal string? PropertyToString (int id) { - return CFString.FromHandle (CopyValue (id)); + return CFString.FromHandle (CopyValue (id), true); } } } diff --git a/src/CFNetwork/CFHTTPMessage.cs b/src/CFNetwork/CFHTTPMessage.cs index 730a9de9699a..aa763a3dc113 100644 --- a/src/CFNetwork/CFHTTPMessage.cs +++ b/src/CFNetwork/CFHTTPMessage.cs @@ -219,7 +219,7 @@ public bool AppendBytes (byte [] bytes, nint count) public NSDictionary? GetAllHeaderFields () { - return Runtime.GetNSObject (CFHTTPMessageCopyAllHeaderFields (GetCheckedHandle ())); + return Runtime.GetNSObject (CFHTTPMessageCopyAllHeaderFields (GetCheckedHandle ()), true); } #region Authentication diff --git a/src/CoreFoundation/CFBundle.cs b/src/CoreFoundation/CFBundle.cs index 52d4df1293c5..27754c0cc9f8 100644 --- a/src/CoreFoundation/CFBundle.cs +++ b/src/CoreFoundation/CFBundle.cs @@ -743,8 +743,7 @@ public NSDictionary? LocalInfoDictionary { { if (url is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url)); - // follow the create rule, no need to retain - NSDictionary? result = Runtime.GetNSObject (CFBundleCopyInfoDictionaryForURL (url.Handle)); + var result = Runtime.GetNSObject (CFBundleCopyInfoDictionaryForURL (url.Handle), true); GC.KeepAlive (url); return result; } diff --git a/src/CoreFoundation/CFType.cs b/src/CoreFoundation/CFType.cs index bf6525055de1..c8350843524f 100644 --- a/src/CoreFoundation/CFType.cs +++ b/src/CoreFoundation/CFType.cs @@ -50,7 +50,7 @@ internal CFType (NativeHandle handle, bool owns) if (handle == IntPtr.Zero) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (handle)); - return CFString.FromHandle (CFCopyDescription (handle)); + return CFString.FromHandle (CFCopyDescription (handle), true); } [DllImport (Constants.CoreFoundationLibrary)] diff --git a/src/CoreGraphics/CGEvent.cs b/src/CoreGraphics/CGEvent.cs index a5e7359d87b6..45f70851886a 100644 --- a/src/CoreGraphics/CGEvent.cs +++ b/src/CoreGraphics/CGEvent.cs @@ -294,7 +294,7 @@ public CGEvent Copy () /// To be added. public NSData? ToData () { - return Runtime.GetNSObject (CGEventCreateData (IntPtr.Zero, Handle)); + return Runtime.GetNSObject (CGEventCreateData (IntPtr.Zero, Handle), true); } [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] diff --git a/src/CoreMedia/CMTime.cs b/src/CoreMedia/CMTime.cs index 7ee1ea21ed88..9a4dfee63670 100644 --- a/src/CoreMedia/CMTime.cs +++ b/src/CoreMedia/CMTime.cs @@ -486,7 +486,7 @@ public NSDictionary ToDictionary () /// To be added. public string? Description { get { - return CFString.FromHandle (CMTimeCopyDescription (IntPtr.Zero, this)); + return CFString.FromHandle (CMTimeCopyDescription (IntPtr.Zero, this), true); } } diff --git a/src/CoreText/CTFont.cs b/src/CoreText/CTFont.cs index 8d56556049c2..28d674c3c8c9 100644 --- a/src/CoreText/CTFont.cs +++ b/src/CoreText/CTFont.cs @@ -2953,7 +2953,7 @@ public CTFontDescriptor GetFontDescriptor () { if (attribute is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (attribute)); - var result = Runtime.GetNSObject (CTFontCopyAttribute (Handle, attribute.Handle)); + var result = Runtime.GetNSObject (CTFontCopyAttribute (Handle, attribute.Handle), true); GC.KeepAlive (attribute); return result; } diff --git a/src/CoreVideo/CVPixelFormatDescription.cs b/src/CoreVideo/CVPixelFormatDescription.cs index f52335c0267e..2fb0d853fc12 100644 --- a/src/CoreVideo/CVPixelFormatDescription.cs +++ b/src/CoreVideo/CVPixelFormatDescription.cs @@ -304,7 +304,7 @@ public static CVPixelFormatType [] AllPixelFormatTypes { /// The pixel format to create a description of. public static NSDictionary? Create (CVPixelFormatType pixelFormat) { - return Runtime.GetNSObject (CVPixelFormatDescriptionCreateWithPixelFormatType (IntPtr.Zero, (int) pixelFormat)); + return Runtime.GetNSObject (CVPixelFormatDescriptionCreateWithPixelFormatType (IntPtr.Zero, (int) pixelFormat), true); } /// Create a description of the specified pixel format. diff --git a/src/MobileCoreServices/UTType.cs b/src/MobileCoreServices/UTType.cs index 8c5092977a26..df32e5d710c8 100644 --- a/src/MobileCoreServices/UTType.cs +++ b/src/MobileCoreServices/UTType.cs @@ -110,7 +110,7 @@ public static bool IsDeclared (string utType) var a = CFString.CreateNative (tagClass); var b = CFString.CreateNative (tag); var c = CFString.CreateNative (conformingToUti); - var ret = CFString.FromHandle (UTTypeCreatePreferredIdentifierForTag (a, b, c)); + var ret = CFString.FromHandle (UTTypeCreatePreferredIdentifierForTag (a, b, c), true); CFString.ReleaseNative (a); CFString.ReleaseNative (b); CFString.ReleaseNative (c); @@ -136,7 +136,7 @@ public static bool IsDeclared (string utType) var a = CFString.CreateNative (tagClass); var b = CFString.CreateNative (tag); var c = CFString.CreateNative (conformingToUti); - var ret = CFArray.StringArrayFromHandle (UTTypeCreateAllIdentifiersForTag (a, b, c)); + var ret = CFArray.StringArrayFromHandle (UTTypeCreateAllIdentifiersForTag (a, b, c), true); CFString.ReleaseNative (a); CFString.ReleaseNative (b); CFString.ReleaseNative (c); @@ -174,7 +174,7 @@ public static bool IsDeclared (string utType) var a = CFString.CreateNative (uti); var b = CFString.CreateNative (tagClass); - var ret = CFArray.StringArrayFromHandle (UTTypeCopyAllTagsWithClass (a, b)); + var ret = CFArray.StringArrayFromHandle (UTTypeCopyAllTagsWithClass (a, b), true); CFString.ReleaseNative (a); CFString.ReleaseNative (b); return ret; @@ -216,7 +216,7 @@ public static bool ConformsTo (string uti, string conformsToUti) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (uti)); var a = CFString.CreateNative (uti); - var ret = CFString.FromHandle (UTTypeCopyDescription (a)); + var ret = CFString.FromHandle (UTTypeCopyDescription (a), true); CFString.ReleaseNative (a); return ret; } @@ -238,7 +238,7 @@ public static bool ConformsTo (string uti, string conformsToUti) var a = CFString.CreateNative (uti); var b = CFString.CreateNative (tagClass); - var ret = CFString.FromHandle (UTTypeCopyPreferredTagWithClass (a, b)); + var ret = CFString.FromHandle (UTTypeCopyPreferredTagWithClass (a, b), true); CFString.ReleaseNative (a); CFString.ReleaseNative (b); return ret; @@ -257,7 +257,7 @@ public static bool ConformsTo (string uti, string conformsToUti) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (uti)); var a = CFString.CreateNative (uti); - var ret = Runtime.GetNSObject (UTTypeCopyDeclaration (a)); + var ret = Runtime.GetNSObject (UTTypeCopyDeclaration (a), true); CFString.ReleaseNative (a); return ret; } @@ -271,7 +271,7 @@ public static bool ConformsTo (string uti, string conformsToUti) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (uti)); var a = CFString.CreateNative (uti); - var ret = Runtime.GetNSObject (UTTypeCopyDeclaringBundleURL (a)); + var ret = Runtime.GetNSObject (UTTypeCopyDeclaringBundleURL (a), true); CFString.ReleaseNative (a); return ret; } diff --git a/tests/monotouch-test/AddressBook/AddressBookTest.cs b/tests/monotouch-test/AddressBook/AddressBookTest.cs index 4bd8e66706a4..b08aa4670c46 100644 --- a/tests/monotouch-test/AddressBook/AddressBookTest.cs +++ b/tests/monotouch-test/AddressBook/AddressBookTest.cs @@ -58,6 +58,16 @@ public void GetSource () // GetSource(0) is not reliable across device/simulator and iOS versions Assert.Null (ab.GetSource (Int32.MaxValue), "MaxValue"); } + + [Test] + public void LocalizedLabel () + { + TestRuntime.CheckAddressBookPermission (); + var label = ABPersonPhoneLabel.Mobile; + var result = ABAddressBook.LocalizedLabel (label); + Assert.NotNull (result, "result"); + Assert.That (result.Length, Is.GreaterThan (0), "Length"); + } } } diff --git a/tests/monotouch-test/AddressBook/PersonTest.cs b/tests/monotouch-test/AddressBook/PersonTest.cs index 0ed91d0e7b81..c34b5568bbce 100644 --- a/tests/monotouch-test/AddressBook/PersonTest.cs +++ b/tests/monotouch-test/AddressBook/PersonTest.cs @@ -11,6 +11,7 @@ using UIKit; using AddressBook; +using Foundation; using Xamarin.Utils; namespace MonoTouchFixtures.AddressBook { @@ -62,6 +63,113 @@ public void UpdateAddressLine () Assert.IsTrue (ab.HasUnsavedChanges); ab.Save (); } + + [Test] + public void LocalizedPropertyName () + { + TestRuntime.CheckAddressBookPermission (); + var name = ABPerson.LocalizedPropertyName (ABPersonProperty.FirstName); + Assert.NotNull (name, "name"); + Assert.That (name.Length, Is.GreaterThan (0), "Length"); + } + + [Test] + public void LocalizedPropertyName_Int () + { + TestRuntime.CheckAddressBookPermission (); + // Use the underlying integer ID for ABPersonProperty.LastName (1) + var name = ABPerson.LocalizedPropertyName (1); + Assert.NotNull (name, "name"); + Assert.That (name.Length, Is.GreaterThan (0), "Length"); + } + + [Test] + public void PersonToString () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + person.FirstName = "Test"; + person.LastName = "Person"; + var str = person.ToString (); + Assert.NotNull (str, "ToString"); + } + } + + [Test] + public void GetImage_NoImage () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + Assert.IsFalse (person.HasImage, "HasImage"); + Assert.IsNull (person.Image, "Image"); + Assert.IsNull (person.GetImage (ABPersonImageFormat.Thumbnail), "GetImage"); + } + } + + [Test] + public void GetLinkedPeople () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + var linked = person.GetLinkedPeople (); + // A new person not in the address book may return null or empty + Assert.IsTrue (linked is null || linked.Length >= 0, "GetLinkedPeople"); + } + } + + [Test] + public void CreateFromVCard () + { + TestRuntime.CheckAddressBookPermission (); + var vcard = "BEGIN:VCARD\nVERSION:3.0\nFN:Test Person\nN:Person;Test;;;\nEND:VCARD\n"; + using (var data = NSData.FromString (vcard)) { + var people = ABPerson.CreateFromVCard (null, data); + Assert.NotNull (people, "people"); + Assert.That (people.Length, Is.GreaterThan (0), "Length"); + } + } + + [Test] + public void PropertyToString_FirstName () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + person.FirstName = "TestFirst"; + Assert.AreEqual ("TestFirst", person.FirstName, "FirstName"); + } + } + + [Test] + public void MultiValueLabel () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + var phones = new ABMutableStringMultiValue (); + phones.Add ("555-1234", ABPersonPhoneLabel.Mobile); + person.SetPhones (phones); + + var allPhones = person.GetPhones (); + Assert.That (allPhones.Count, Is.GreaterThan (0), "Count"); + Assert.NotNull (allPhones [0].Label, "Label"); + } + } + + [Test] + public void MultiValueGetValues () + { + TestRuntime.CheckAddressBookPermission (); + using (var person = new ABPerson ()) { + var phones = new ABMutableStringMultiValue (); + phones.Add ("555-1234", ABPersonPhoneLabel.Mobile); + phones.Add ("555-5678", ABPersonPhoneLabel.Main); + person.SetPhones (phones); + + var allPhones = person.GetPhones (); + var values = allPhones.GetValues (); + Assert.NotNull (values, "values"); + Assert.That (values.Length, Is.EqualTo (2), "Length"); + } + } } } diff --git a/tests/monotouch-test/CoreFoundation/BundleTest.cs b/tests/monotouch-test/CoreFoundation/BundleTest.cs index 85024aa0ba3c..69246f32ae6e 100644 --- a/tests/monotouch-test/CoreFoundation/BundleTest.cs +++ b/tests/monotouch-test/CoreFoundation/BundleTest.cs @@ -330,6 +330,16 @@ public void TestGetInfoDictionaryNull () Assert.Throws (() => CFBundle.GetInfoDictionary (null)); } + [Test] + public void TestGetInfoDictionary () + { + var main = CFBundle.GetMain (); + Assert.NotNull (main.Url, "Url"); + var dict = CFBundle.GetInfoDictionary (main.Url); + Assert.NotNull (dict, "GetInfoDictionary"); + Assert.That (dict.Count, Is.GreaterThan ((nuint) 0), "Count"); + } + [Test] public void GetLocalizedString () { diff --git a/tests/monotouch-test/CoreGraphics/CGEventTests.cs b/tests/monotouch-test/CoreGraphics/CGEventTests.cs index 0472e7b7bf78..a1ba48dee301 100644 --- a/tests/monotouch-test/CoreGraphics/CGEventTests.cs +++ b/tests/monotouch-test/CoreGraphics/CGEventTests.cs @@ -118,6 +118,15 @@ public void PostToPSN () [DllImport ("/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices")] static extern int GetProcessForPID (int pid, out IntPtr psn); + + [Test] + public void ToData () + { + using var evt = new CGEvent (null, CGScrollEventUnit.Pixel, 0); + using var data = evt.ToData (); + Assert.NotNull (data, "data"); + Assert.That (data.Length, Is.GreaterThan ((nuint) 0), "Length"); + } #endif // __MACOS__ || __MACCATALYST__ } } diff --git a/tests/monotouch-test/CoreServices/HttpMessageTest.cs b/tests/monotouch-test/CoreServices/HttpMessageTest.cs index fe73ce19ab8f..825d1cba566b 100644 --- a/tests/monotouch-test/CoreServices/HttpMessageTest.cs +++ b/tests/monotouch-test/CoreServices/HttpMessageTest.cs @@ -62,6 +62,17 @@ public void CreateRequest10 () } } + [Test] + public void GetAllHeaderFields () + { + using (var m = CFHTTPMessage.CreateRequest (NetworkResources.XamarinUri, "GET", new Version (1, 1))) { + m.SetHeaderFieldValue ("X-Test", "value"); + var headers = m.GetAllHeaderFields (); + Assert.NotNull (headers, "headers"); + Assert.That (headers.Count, Is.GreaterThan ((nuint) 0), "Count"); + } + } + [Test] public void CreateResponseAuth () { diff --git a/tests/monotouch-test/CoreText/FontTest.cs b/tests/monotouch-test/CoreText/FontTest.cs index 3d90d0211117..ed4513a373d6 100644 --- a/tests/monotouch-test/CoreText/FontTest.cs +++ b/tests/monotouch-test/CoreText/FontTest.cs @@ -153,6 +153,16 @@ public void GetTypographicBoundsForAdaptiveImageProvider () Assert.AreEqual (0, provider.Count, "#Count"); } + [Test] + public void GetAttribute () + { + using (var font = new CTFont ("HoeflerText-Regular", 10, CTFontOptions.Default)) { + using (var name = font.GetAttribute (CTFontDescriptorAttributeKey.Name)) { + Assert.NotNull (name, "Name"); + } + } + } + class AdaptiveImageProvider : NSObject, ICTAdaptiveImageProviding { public int Count; public CGImage? GetImage (CGSize proposedSize, nfloat scaleFactor, out CGPoint imageOffset, out CGSize imageSize) diff --git a/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs b/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs index 3b0eef7a9a9e..7bb9e3783c20 100644 --- a/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs +++ b/tests/monotouch-test/MobileCoreServices/UTTypeTest.cs @@ -167,5 +167,35 @@ public void Equals () Assert.False (UTType.Equals (UTType.PDF, null), "PDF-null"); Assert.True (UTType.Equals (UTType.PDF, UTType.PDF), "PDF-PDF"); } + + [Test] + public void CreateAllIdentifiers () + { + TestRuntime.AssertIfSimulatorThenARM64 (); + + var result = UTType.CreateAllIdentifiers (UTType.TagClassFilenameExtension, "pdf", null); + Assert.NotNull (result, "result"); + Assert.That (result.Length, Is.GreaterThan (0), "Length"); + } + + [Test] + public void CopyAllTags () + { + TestRuntime.AssertIfSimulatorThenARM64 (); + + var result = UTType.CopyAllTags (UTType.PDF, UTType.TagClassFilenameExtension); + Assert.NotNull (result, "result"); + Assert.That (result.Length, Is.GreaterThan (0), "Length"); + } + + [Test] + public void GetDescription () + { + TestRuntime.AssertIfSimulatorThenARM64 (); + + var result = UTType.GetDescription (UTType.PDF); + Assert.NotNull (result, "result"); + Assert.That (result.Length, Is.GreaterThan (0), "Length"); + } } } From bb211b5408ffb28d04d3ac7906f42f54ea5812a8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:09:27 +0100 Subject: [PATCH 03/12] [main] Update dependencies from dotnet/dotnet (#24799) This pull request updates the following dependencies ## From https://github.com/dotnet/dotnet - **Subscription**: [30303172-6f12-44a9-887a-ea8520fce068](https://maestro.dot.net/subscriptions?search=30303172-6f12-44a9-887a-ea8520fce068) - **Build**: [20260226.3](https://dev.azure.com/dnceng/internal/_build/results?buildId=2913312) ([303524](https://maestro.dot.net/channel/9626/github:dotnet:dotnet/build/303524)) - **Date Produced**: February 26, 2026 2:17:36 PM UTC - **Commit**: [c9c7256d0410d9f00ad7e4df1f56dfdf88f44418](https://github.com/dotnet/dotnet/commit/c9c7256d0410d9f00ad7e4df1f56dfdf88f44418) - **Branch**: [release/10.0.3xx](https://github.com/dotnet/dotnet/tree/release/10.0.3xx) - **Dependency Updates**: - From [10.0.0-beta.26125.125 to 10.0.0-beta.26126.103][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.SharedFramework.Sdk - From [10.0.300-preview.26125.125 to 10.0.300-preview.26126.103][1] - Microsoft.NET.Sdk - Microsoft.TemplateEngine.Authoring.Tasks [1]: https://github.com/dotnet/dotnet/compare/44cf8112b8...c9c7256d04 --- NuGet.config | 1 + eng/Version.Details.props | 10 +++++----- eng/Version.Details.xml | 20 ++++++++++---------- global.json | 6 +++--- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/NuGet.config b/NuGet.config index dd0d127c085f..375ee513cb1f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,6 +13,7 @@ + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 338c36da00bc..b1222f946203 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,16 +6,16 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26125.125 - 10.0.0-beta.26125.125 + 10.0.0-beta.26126.103 + 10.0.0-beta.26126.103 0.11.5-alpha.26070.104 - 10.0.0-beta.26125.125 + 10.0.0-beta.26126.103 10.0.3-servicing.26070.104 10.0.3 10.0.3 - 10.0.300-preview.26125.125 + 10.0.300-preview.26126.103 10.0.3 - 10.0.300-preview.26125.125 + 10.0.300-preview.26126.103 26.0.11017 18.5.9227 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d2e363f8bc21..8aec5cd07e2a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/dotnet - 44cf8112b85b5d087e0384dd6451a1e708d7f50c + c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 https://github.com/dotnet/dotnet @@ -95,25 +95,25 @@ - + https://github.com/dotnet/dotnet - 44cf8112b85b5d087e0384dd6451a1e708d7f50c + c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 - + https://github.com/dotnet/dotnet - 44cf8112b85b5d087e0384dd6451a1e708d7f50c + c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 - + https://github.com/dotnet/dotnet - 44cf8112b85b5d087e0384dd6451a1e708d7f50c + c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 https://github.com/dotnet/xharness 0eeaa60169fe6a95932d29d822e20eb225ce0143 - + https://github.com/dotnet/dotnet - 44cf8112b85b5d087e0384dd6451a1e708d7f50c + c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 diff --git a/global.json b/global.json index 1a3eae32a341..b551b337a116 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.300-preview.26125.125", + "version": "10.0.300-preview.26126.103", "paths": [ "builds/downloads/dotnet", "$host$" @@ -8,9 +8,9 @@ "errorMessage": "The .NET SDK could not be found, please run 'make dotnet -C builds'." }, "tools": { - "dotnet": "10.0.300-preview.26125.125" + "dotnet": "10.0.300-preview.26126.103" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26125.125" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26126.103" } } From 5e1e5a59c860f08c1acd615c3f35d28f8ad7d1f7 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 27 Feb 2026 15:58:04 +0100 Subject: [PATCH 04/12] [build] Make it possible to only build Objective-Sharpie. (#24788) * Add a --only-sharpie option to configure. * Automatically enable --only-sharpie for the release/sharpie and release-test/only-sharpie branches. * Cut away parts from the build that don't work when we're not building any platform. * Ignore tests that don't have the desired platform available. * For CI, some parts depend on having build artifacts from at least one platform. We now generate those build artifacts for iOS, and use those when no platforms are enabled. * Enable symbol packages for sharpie, the publishing logic expects symbol packages to be present. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Make.config | 8 ++++ Makefile | 8 +++- configure | 10 +++++ dotnet/Makefile | 10 +++++ .../generate-vs-workload.cs | 9 ++++- tests/Makefile | 6 +++ .../Sharpie.Bind.Tests/ObjectiveCClass.cs | 13 +++++++ .../sharpie/Sharpie.Bind.Tests/OnDiskTests.cs | 2 + tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs | 2 + tests/test-libraries/Makefile | 4 ++ tests/test-libraries/frameworks/Makefile | 2 + tests/test-libraries/nugets/Makefile | 6 ++- .../devops/automation/scripts/Governance.psm1 | 2 +- .../scripts/TestConfiguration.Tests.ps1 | 39 +++++++++++++++---- .../automation/scripts/TestConfiguration.psm1 | 4 ++ .../automation/scripts/bash/build-nugets.sh | 9 ++++- .../scripts/bash/configure-decisions.sh | 3 ++ .../scripts/bash/install-workloads.sh | 4 +- .../automation/templates/api-diff-stage.yml | 1 + .../automation/templates/common/configure.yml | 5 ++- .../automation/templates/governance/stage.yml | 1 + .../templates/release/vs-insertion-prep.yml | 26 ++++++++++++- .../automation/templates/tests-stage.yml | 1 + tools/sharpie/Makefile | 2 +- .../Sharpie.Bind.Tool.csproj | 1 + 25 files changed, 159 insertions(+), 19 deletions(-) diff --git a/Make.config b/Make.config index 4cdf49dfb394..41676bd15aca 100644 --- a/Make.config +++ b/Make.config @@ -281,10 +281,18 @@ MIN_TVOS_SIMULATOR_VERSION=16.0 # These are the simulator package ids for the versions above EXTRA_SIMULATORS=iOS:MIN_IOS_SIMULATOR_VERSION tvOS:MIN_TVOS_SIMULATOR_VERSION +ifeq ($(ONLY_SHARPIE),) +ifneq ($(filter $(CURRENT_BRANCH),release/sharpie release-test/only-sharpie),) +ONLY_SHARPIE=1 +endif +endif + +ifndef ONLY_SHARPIE INCLUDE_IOS=1 INCLUDE_MAC=1 INCLUDE_TVOS=1 INCLUDE_MACCATALYST=1 +endif INCLUDE_SIMULATOR=1 INCLUDE_DEVICE=1 diff --git a/Makefile b/Makefile index aa000f2ee604..c3ad7716de0d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,13 @@ ifndef IS_LINUX SUBDIRS += runtime endif -SUBDIRS += src msbuild tools +SUBDIRS += src + +ifndef ONLY_SHARPIE +SUBDIRS += msbuild +endif + +SUBDIRS += tools ifndef IS_LINUX SUBDIRS += dotnet diff --git a/configure b/configure index 1c6d64b9c36d..4a126a2a5bd1 100755 --- a/configure +++ b/configure @@ -25,6 +25,8 @@ Usage: configure [options] --enable-xamarin --disable-xamarin Enable/disable additional Xamarin-specific parts of the build. + --only-sharpie Only build Objective-Sharpie. This is on by default for the branch 'release/sharpie', and disabled otherwise. + --custom-dotnet=[dotnet/runtime] Use a locally built version of dotnet/runtime. Pass the path to an already build checkout of dotnet/runtime. See docs/CORECLR.md for detailed instructions about how to build dotnet/runtime from source. --ignore-unknown-params alters the default behavior to not return an non-zero exit code when an unknown parameter is provided. @@ -134,6 +136,14 @@ while test "x$1" != x; do echo "INCLUDE_SIMULATOR=" >> "$CONFIGURED_FILE" shift ;; + --only-sharpie) + echo "ONLY_SHARPIE=1" >> "$CONFIGURED_FILE" + echo "INCLUDE_MAC=" >> $CONFIGURED_FILE + echo "INCLUDE_IOS=" >> $CONFIGURED_FILE + echo "INCLUDE_TVOS=" >> $CONFIGURED_FILE + echo "INCLUDE_MACCATALYST=" >> $CONFIGURED_FILE + shift + ;; --ignore-unknown-params) echo "ignoring unknown parameters" IGNORE_UNKNOWN_PARAMS=true diff --git a/dotnet/Makefile b/dotnet/Makefile index a03cbe892b00..5b9c9cc6ee94 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -135,7 +135,15 @@ Microsoft.$1.Sdk/targets/Microsoft.$1.Sdk.Versions.props: targets/Microsoft.$1.S endef $(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call VersionsTemplate,$(platform),$(shell echo $(platform) | tr a-z A-Z),$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS),$(shell echo $(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS) | tr ' ' ';'),$(DOTNET_$(shell echo $(platform) | tr a-z A-Z)_RUNTIME_IDENTIFIERS_NO_ARCH)))) +# When building only sharpie, generate iOS version props so setup-publish-bar-manifest works for DARC +ifdef ONLY_SHARPIE +$(eval $(call VersionsTemplate,iOS,IOS,,,ios)) +endif + version-props: $(foreach platform,$(DOTNET_PLATFORMS),targets/Microsoft.$(platform).Sdk.Versions.props) +ifdef ONLY_SHARPIE +version-props: targets/Microsoft.iOS.Sdk.Versions.props +endif setup-publish-bar-manifest: version-props echo \#\#vso[task.setvariable variable=PrereleaseIdentifier]$(NUGET_PRERELEASE_IDENTIFIER) @@ -465,7 +473,9 @@ NUGET_SOURCES:=$(shell grep https://pkgs.dev.azure.com $(TOP)/NuGet.config | sed $(foreach platform,$(DOTNET_PLATFORMS),$(shell echo $(platform) | tr A-Z a-z)) $(Q) touch $@ +ifndef ONLY_SHARPIE TARGETS += .stamp-install-workloads +endif TARGETS += $(WORKLOAD_TARGETS) $(WINDOWS_PACKAGE_TARGETS) diff --git a/scripts/generate-vs-workload/generate-vs-workload.cs b/scripts/generate-vs-workload/generate-vs-workload.cs index 6d198f727181..9b02fd6ea6bf 100755 --- a/scripts/generate-vs-workload/generate-vs-workload.cs +++ b/scripts/generate-vs-workload/generate-vs-workload.cs @@ -62,7 +62,14 @@ writer.WriteLine ($" {allPlatforms}.{tfm}.{xcodeName}"); // Find the iOS version, otherwise use the version of the first platform listed. var iOSPlatform = platforms.Where (v => v.Item1 == "iOS"); - var manifestBuildVersion = iOSPlatform.Any () ? iOSPlatform.First ().Item2 : platforms.First ().Item2; + string manifestBuildVersion; + if (iOSPlatform.Any ()) { + manifestBuildVersion = iOSPlatform.First ().Item2; + } else if (platforms.Any ()) { + manifestBuildVersion = platforms.First ().Item2; + } else { + manifestBuildVersion = "0.0.1"; // happens when building only sharpie + } writer.WriteLine ($" {manifestBuildVersion}"); writer.WriteLine ($" true"); writer.WriteLine ($" false"); diff --git a/tests/Makefile b/tests/Makefile index 3b606359c523..3651dc51502b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,9 +3,11 @@ TOP = .. include $(TOP)/Make.config # Skip test-libraries on Linux (requires native compilation with Xcode/clang) +ifndef ONLY_SHARPIE ifndef IS_LINUX SUBDIRS=test-libraries endif +endif SUBDIRS += dotnet include $(TOP)/mk/rules.mk @@ -195,12 +197,16 @@ verify-system-vsmac-xcode-match: if [[ "$$SYSTEM_XCODE" != "$$VSMAC_XCODE" ]]; then echo "Error: the system's Xcode ($$SYSTEM_XCODE) does not match the Xcode selected in Visual Studio for Mac ($$VSMAC_XCODE). This will make tests fail in non-trivial ways, so please make sure both match the expected Xcode ($(shell dirname $(shell dirname $(XCODE_DEVELOPER_ROOT))))."; exit 1; fi package-test-libraries.zip: +ifndef ONLY_SHARPIE $(Q) $(MAKE) all -C test-libraries $(Q) $(MAKE) all -C test-libraries/custom-type-assembly build-assembly +endif $(Q_GEN) rm -f "$@" "$@.tmp" $(Q_GEN) cd $(TOP) && zip -9r --symlinks $(abspath $@).tmp ./tests/test-libraries +ifndef ONLY_SHARPIE $(Q_GEN) cd $(TOP) && find tests -regex 'tests/test-libraries/custom-type-assembly/.libs/.*dll' -exec zip -9r --symlinks $(abspath $@).tmp {} + $(Q_GEN) cd $(TOP) && git ls-files -o -- 'tests/bindings-test/*.generated.cs' | zip -9r --symlinks $(abspath $@).tmp -@ +endif $(Q) mv "$@".tmp "$@" build-all: diff --git a/tests/sharpie/Sharpie.Bind.Tests/ObjectiveCClass.cs b/tests/sharpie/Sharpie.Bind.Tests/ObjectiveCClass.cs index 839e682c8404..3ef19a810e1b 100644 --- a/tests/sharpie/Sharpie.Bind.Tests/ObjectiveCClass.cs +++ b/tests/sharpie/Sharpie.Bind.Tests/ObjectiveCClass.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using Xamarin; +using Xamarin.Tests; using Xamarin.Utils; namespace Sharpie.Bind.Tests; @@ -24,6 +25,7 @@ public void ErrorNoNSObject () File.WriteAllText (tmpfile, code); binder.SourceFile = tmpfile; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -48,6 +50,7 @@ @interface MyClass { binder.SplitDocuments = false; binder.SourceFile = tmpfile; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -86,6 +89,7 @@ @interface MyClass { binder.SplitDocuments = false; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -127,6 +131,7 @@ @interface Widget { binder.SplitDocuments = false; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -169,6 +174,7 @@ @interface MyClass { binder.SourceFramework = frameworkDir; binder.Namespace = "CustomNamespace"; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -202,6 +208,7 @@ public void BindFramework_ErrorBothSourceFileAndFramework () binder.SourceFile = tmpfile; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -217,6 +224,7 @@ public void BindFramework_ErrorNonExistentFramework () var frameworkDir = Path.Combine (tmpdir, "NonExistent.framework"); binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -233,6 +241,7 @@ public void BindFramework_ErrorNoUmbrellaHeaderOrModuleMap () Directory.CreateDirectory (frameworkDir); binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -274,6 +283,7 @@ @interface MyClass { binder.SplitDocuments = false; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.MacOSX); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (ApplePlatform.MacOSX); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); // Don't set binder.Sdk - it should be read from the Info.plist @@ -328,6 +338,7 @@ @interface MyClass { binder.SplitDocuments = false; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.MacOSX); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (ApplePlatform.MacOSX); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); @@ -368,6 +379,7 @@ umbrella header "ModKit.h" binder.SplitDocuments = false; binder.SourceFramework = frameworkDir; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); // Do NOT manually set ClangArguments with -F — it should be auto-added. @@ -410,6 +422,7 @@ @interface MyClass { File.WriteAllText (tmpfile, code); binder.SourceFile = tmpfile; binder.OutputDirectory = tmpdir; + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var bindings = binder.BindInOrOut (); diff --git a/tests/sharpie/Sharpie.Bind.Tests/OnDiskTests.cs b/tests/sharpie/Sharpie.Bind.Tests/OnDiskTests.cs index f663fb33052a..be0db1ff8e84 100644 --- a/tests/sharpie/Sharpie.Bind.Tests/OnDiskTests.cs +++ b/tests/sharpie/Sharpie.Bind.Tests/OnDiskTests.cs @@ -6,6 +6,7 @@ using ClangSharp.Interop; using NUnit.Framework.Constraints; using Xamarin; +using Xamarin.Tests; namespace Sharpie.Bind.Tests; @@ -150,6 +151,7 @@ void ParseBindTestImpl (string path, string variant, string bindArguments) binder.ClangArguments.AddRange (clangArguments); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); var result = binder.BindInOrOut (); var tmpdir = Cache.CreateTemporaryDirectory (); diff --git a/tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs b/tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs index 9f6332daa2ed..043499ac6a29 100644 --- a/tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs +++ b/tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using Xamarin; +using Xamarin.Tests; namespace Sharpie.Bind.Tests; @@ -70,6 +71,7 @@ public void TestSdkPath (bool usingModules, string sdk, string []? excludedFrame binder.Sdk = sdk; binder.OutputDirectory = tmpdir; binder.PlatformAssembly = Extensions.GetPlatformAssemblyPath (binder.Platform); + Configuration.IgnoreIfIgnoredPlatform (binder.Platform); binder.ClangResourceDirectory = Extensions.GetClangResourceDirectory (); var rv = binder.BindInOrOut (); rv.AssertSuccess (null); diff --git a/tests/test-libraries/Makefile b/tests/test-libraries/Makefile index 360da4b46c7d..732e37721796 100644 --- a/tests/test-libraries/Makefile +++ b/tests/test-libraries/Makefile @@ -332,6 +332,7 @@ endef $(foreach rid,$(DOTNET_RUNTIME_IDENTIFIERS),$(eval $(call SwiftTest2AddDependency,$(rid)))) # create an xcframework of frameworks +ifneq ($(XCFRAMEWORK_PLATFORMS),) define TestFrameworkXCFramework $(1)_XCFRAMEWORKS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework) $(1)_XCTARGETS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework.stamp) @@ -363,7 +364,9 @@ all-local:: .libs/$(1).xcframework endef $(eval $(call TestLibraryXCFramework,libtest)) $(eval $(call TestLibraryXCFramework,libtest2)) +endif # XCFRAMEWORK_PLATFORMS +ifneq ($(XCFRAMEWORK_PLATFORMS),) define ZippedXcframework .libs/$(1).xcframework.zip: .libs/$(1).xcframework $$(Q_ZIP) cd .libs && $(ZIP) -r "$$(notdir $$@)" "$$(notdir $$<)" @@ -379,6 +382,7 @@ define ZippedXcframeworkPlatformSpecific all-local:: .libs/$(3)/$(1).xcframework.zip endef $(foreach platform,$(DOTNET_PLATFORMS),$(foreach testFramework,$(TEST_FRAMEWORKS),$(eval $(call ZippedXcframeworkPlatformSpecific,$(testFramework),$(platform),$(shell echo $(platform) | tr 'A-Z' 'a-z'))))) +endif # XCFRAMEWORK_PLATFORMS include $(TOP)/mk/rules.mk diff --git a/tests/test-libraries/frameworks/Makefile b/tests/test-libraries/frameworks/Makefile index 56fa6b5fcee9..6d16358a3d6f 100644 --- a/tests/test-libraries/frameworks/Makefile +++ b/tests/test-libraries/frameworks/Makefile @@ -192,6 +192,7 @@ endef # 3: runtime identifier $(foreach name,$(NAMES),$(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call FrameworkTemplate,$(name),$(DOTNET_$(rid)_SDK_PLATFORM),$(rid),$(shell echo $(name) | tr '.' '_')))))) +ifneq ($(DOTNET_PLATFORMS),) define XCTemplate .libs/$(3)/$(1).framework.stamp: $$(foreach rid,$$($(3)_XC_RUNTIMEIDENTIFIERS),.libs/$$(rid)/$(1).framework.stamp) | .libs/$(3) $$(Q) rm -Rf .libs/$(3)/$(1).framework @@ -229,6 +230,7 @@ $(foreach name,$(NAMES),$(eval $(call XCFrameworkTemplate,$(name)))) zip: $(ZIPPED_TARGETS) all-local:: $(ZIPPED_TARGETS) +endif # DOTNET_PLATFORMS define PlugInTemplate diff --git a/tests/test-libraries/nugets/Makefile b/tests/test-libraries/nugets/Makefile index 66792ab973f3..41032e37a8a8 100644 --- a/tests/test-libraries/nugets/Makefile +++ b/tests/test-libraries/nugets/Makefile @@ -1,8 +1,12 @@ TOP=../../.. + +include $(TOP)/Make.config + +ifneq ($(DOTNET_PLATFORMS),) SUBDIRS = \ FrameworksInRuntimesNativeDirectory \ DynamicLibrariesInRuntimesNativeDirectory \ XCFrameworkWithStaticLibraryInRuntimesNativeDirectory \ XCFrameworkWithSymlinks \ -include $(TOP)/Make.config +endif diff --git a/tools/devops/automation/scripts/Governance.psm1 b/tools/devops/automation/scripts/Governance.psm1 index 3e9db8fee726..450a2ee1a574 100644 --- a/tools/devops/automation/scripts/Governance.psm1 +++ b/tools/devops/automation/scripts/Governance.psm1 @@ -44,7 +44,7 @@ function Get-APIScanConfiguration { $EnabledPlatforms ) - $arrEnabledPlatforms = -split $EnabledPlatforms + $arrEnabledPlatforms = @(-split $EnabledPlatforms | Where-Object { $_ }) $config = [APIScanConfiguration]::new($arrEnabledPlatforms) return $config.Create() } diff --git a/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 b/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 index 574f3c5b9ec2..cbeff72d6c3b 100644 --- a/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 +++ b/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 @@ -217,8 +217,31 @@ Describe 'Get-TestConfiguration' { It 'succeeds when no dotnet platforms enabled' { $EnabledPlatforms = "" + $TestConfigurationsWithSharpie = @" +[ + { + "label": "cecil", + "splitByPlatforms": "false", + "testPrefix": "test-prefix_", + "testStage": "simulator", + }, + { + "label": "sharpie", + "splitByPlatforms": "false", + "supportsNoPlatforms": "true", + "testPrefix": "simulator_tests", + }, + { + "label": "dotnettests", + "splitByPlatforms": "true", + "needsMultiplePlatforms": "true", + "testPrefix": "test-prefix_", + } +] +"@ + $config = Get-TestConfiguration ` - -TestConfigurations $TestConfigurations ` + -TestConfigurations $TestConfigurationsWithSharpie ` -SupportedPlatforms $SupportedPlatforms ` -EnabledPlatforms $EnabledPlatforms ` -TestsLabels "extra-test-labels" ` @@ -226,13 +249,13 @@ Describe 'Get-TestConfiguration' { Write-Host $config $config | Should -Be @" { - "cecil": { - "LABEL": "cecil", - "TESTS_LABELS": "extra-test-labels,run-cecil-tests", - "TEST_STAGE": "simulator", - "LABEL_WITH_PLATFORM": "cecil", - "STATUS_CONTEXT": "status-context - cecil", - "TEST_PREFIX": "test-prefix_cecil", + "sharpie": { + "LABEL": "sharpie", + "TESTS_LABELS": "extra-test-labels,run-sharpie-tests", + "TEST_STAGE": "simulator_tests", + "LABEL_WITH_PLATFORM": "sharpie", + "STATUS_CONTEXT": "status-context - sharpie", + "TEST_PREFIX": "simulator_testssharpie", "TEST_PLATFORM": "" } } diff --git a/tools/devops/automation/scripts/TestConfiguration.psm1 b/tools/devops/automation/scripts/TestConfiguration.psm1 index 148db8f7e1eb..61340c7eb7d1 100644 --- a/tools/devops/automation/scripts/TestConfiguration.psm1 +++ b/tools/devops/automation/scripts/TestConfiguration.psm1 @@ -95,6 +95,10 @@ class TestConfiguration { $rv[$platformLabel] = $platformVars } } else { + if ($this.enabledPlatforms.Length -eq 0 -and $config.supportsNoPlatforms -ne "true" -and $config.supportsNoPlatforms -ne $true) { + Write-Host "No enabled platforms, skipping test $label (supportsNoPlatforms=$($config.supportsNoPlatforms))" + continue + } # set non-platform specific variables $vars["LABEL_WITH_PLATFORM"] = "$label" $vars["STATUS_CONTEXT"] = "$($this.statusContext) - $($label)" diff --git a/tools/devops/automation/scripts/bash/build-nugets.sh b/tools/devops/automation/scripts/bash/build-nugets.sh index 2bd436c4cf08..d564e8416479 100755 --- a/tools/devops/automation/scripts/bash/build-nugets.sh +++ b/tools/devops/automation/scripts/bash/build-nugets.sh @@ -15,8 +15,13 @@ mkdir -p ../package/ rm -rf ../symbols/ mkdir -p ../symbols/ cp -c "$DOTNET_NUPKG_DIR"/*.nupkg ../package/ -cp -c dotnet/nupkgs/*.symbols.nupkg ../symbols/ -cp -c "$DOTNET_NUPKG_DIR"/vs-workload.props ../package/ +mv ../package/*.symbols.nupkg ../symbols/ +if compgen -G 'dotnet/nupkgs/*.symbols.nupkg' > /dev/null; then + cp -c dotnet/nupkgs/*.symbols.nupkg ../symbols/ +fi +if test -f "$DOTNET_NUPKG_DIR"/vs-workload.props; then + cp -c "$DOTNET_NUPKG_DIR"/vs-workload.props ../package/ +fi cp -c dotnet/Workloads/SignList.xml ../package/ cp -c dotnet/Workloads/SignList.targets ../package/ cp -c dotnet/Workloads/SignVerifyIgnore.txt ../package/ diff --git a/tools/devops/automation/scripts/bash/configure-decisions.sh b/tools/devops/automation/scripts/bash/configure-decisions.sh index 669cbc6d3f15..dac588bafaed 100755 --- a/tools/devops/automation/scripts/bash/configure-decisions.sh +++ b/tools/devops/automation/scripts/bash/configure-decisions.sh @@ -42,6 +42,9 @@ elif [[ "${LABELS_RUN_WINDOWS_TESTS:-}" == "True" ]]; then elif [[ "${LABELS_SKIP_ALL_TESTS:-}" == "True" ]]; then # All tests have been skipped RUN_WINDOWS_TESTS=false +elif [[ "${CONFIGURE_PLATFORMS_DOTNET_PLATFORMS:-}" == "" ]]; then + # No platforms enabled, don't run windows tests + RUN_WINDOWS_TESTS=false else # Otherwise run windows tests (we want to run windows tests if any platform is enabled) RUN_WINDOWS_TESTS=true diff --git a/tools/devops/automation/scripts/bash/install-workloads.sh b/tools/devops/automation/scripts/bash/install-workloads.sh index f4fbf59107c3..132d59c9b777 100755 --- a/tools/devops/automation/scripts/bash/install-workloads.sh +++ b/tools/devops/automation/scripts/bash/install-workloads.sh @@ -72,8 +72,8 @@ cat "$ROLLBACK_PATH" mkdir -p "$DOTNET_NUPKG_DIR" ls -R "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package" cp "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package/"*.nupkg "$DOTNET_NUPKG_DIR" -cp "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package/"*.pkg "$DOTNET_NUPKG_DIR" -cp "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package/"*.zip "$DOTNET_NUPKG_DIR" +cp "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package/"*.pkg "$DOTNET_NUPKG_DIR" 2>/dev/null || true +cp "$ARTIFACTS_PATH/${MACIOS_UPLOAD_PREFIX}not-signed-package/"*.zip "$DOTNET_NUPKG_DIR" 2>/dev/null || true ls -R "$DOTNET_NUPKG_DIR" NUGET_SOURCES=$(grep https://pkgs.dev.azure.com ./NuGet.config | sed -e 's/.*value="//' -e 's/".*//') diff --git a/tools/devops/automation/templates/api-diff-stage.yml b/tools/devops/automation/templates/api-diff-stage.yml index 8d2b5bf00ca8..a81ac79c8bda 100644 --- a/tools/devops/automation/templates/api-diff-stage.yml +++ b/tools/devops/automation/templates/api-diff-stage.yml @@ -55,6 +55,7 @@ stages: - stage: generate_api_diff displayName: 'API diff' dependsOn: [ configure_build ] + condition: and(succeeded(), ne(dependencies.configure_build.outputs['configure.configure_platforms.DOTNET_PLATFORMS'], '')) jobs: - template: ./build/api-diff-stage.yml parameters: diff --git a/tools/devops/automation/templates/common/configure.yml b/tools/devops/automation/templates/common/configure.yml index df7900016d4d..4eef3b811f88 100644 --- a/tools/devops/automation/templates/common/configure.yml +++ b/tools/devops/automation/templates/common/configure.yml @@ -86,6 +86,7 @@ parameters: { label: sharpie, splitByPlatforms: false, + supportsNoPlatforms: true, testPrefix: 'simulator_tests', }, { @@ -269,9 +270,11 @@ steps: Write-Host "apiScanMatrix=$apiScanMatrix" if ($apiScanMatrix.length -gt 0) { $apiScanMatrix = $apiScanMatrix | ConvertFrom-Json | ConvertTo-Json -Compress + Edit-BuildConfiguration -ConfigKey APISCAN_MATRIX -ConfigValue $apiScanMatrix -ConfigFile $Env:CONFIG_PATH + } else { + $apiScanMatrix = "{}" } Write-Host "##vso[task.setvariable variable=APISCAN_MATRIX;isOutput=true]$apiScanMatrix" - Edit-BuildConfiguration -ConfigKey APISCAN_MATRIX -ConfigValue $apiScanMatrix -ConfigFile $Env:CONFIG_PATH name: apiscan_matrix displayName: 'Create APIScan matrix' diff --git a/tools/devops/automation/templates/governance/stage.yml b/tools/devops/automation/templates/governance/stage.yml index deb65f40dc7e..9211cd5c5924 100644 --- a/tools/devops/automation/templates/governance/stage.yml +++ b/tools/devops/automation/templates/governance/stage.yml @@ -27,6 +27,7 @@ stages: - stage: governance_checks displayName: '${{ parameters.stageDisplayNamePrefix }}API Scan' dependsOn: ${{ parameters.dependsOn }} + condition: and(succeeded(), ne(dependencies.configure_build.outputs['configure.configure_platforms.DOTNET_PLATFORMS'], '')) jobs: - job: apiscan diff --git a/tools/devops/automation/templates/release/vs-insertion-prep.yml b/tools/devops/automation/templates/release/vs-insertion-prep.yml index a9ecb69b8e1b..52e1315afd4d 100644 --- a/tools/devops/automation/templates/release/vs-insertion-prep.yml +++ b/tools/devops/automation/templates/release/vs-insertion-prep.yml @@ -79,6 +79,7 @@ stages: use1ESTemplate: true yamlResourceName: yaml-templates dependsOn: signing + condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'], '') artifactName: '${{ parameters.uploadPrefix }}nuget-signed' propsArtifactName: ${{ parameters.uploadPrefix }}not-signed-package binlogsArtifactName: ${{ parameters.uploadPrefix }}nuget-msi-convert-binlogs @@ -119,12 +120,15 @@ stages: ), or( eq(dependencies.nuget_convert.result, 'Succeeded'), - eq(dependencies.nuget_convert.result, 'SucceededWithIssues') + eq(dependencies.nuget_convert.result, 'SucceededWithIssues'), + eq(dependencies.nuget_convert.result, 'Skipped') ) ) variables: - name: skipNugetSecurityAnalysis value: true + - name: DOTNET_PLATFORMS + value: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] - name: INCLUDE_DOTNET_IOS value: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ] - name: INCLUDE_DOTNET_MACCATALYST @@ -160,17 +164,25 @@ stages: artifactName: not-signed-package-symbols downloadPath: $(Build.StagingDirectory)\symbols + - powershell: | + $buildNumber = "$(Build.BuildNumber)" + Write-Host "##vso[task.setvariable variable=ReleaseDropPrefix]$buildNumber" + displayName: Set fallback ReleaseDropPrefix + condition: and(succeeded(), eq(variables['DOTNET_PLATFORMS'], '')) + - task: DownloadPipelineArtifact@2 inputs: artifactName: DropMetadata-shipping-nugets downloadPath: $(Build.StagingDirectory)\metadata displayName: Download nugets drop metadata + condition: and(succeeded(), ne(variables['DOTNET_PLATFORMS'], '')) - powershell: | $jsonContent = Get-Content -Path "$(Build.StagingDirectory)\metadata\VSTSDrop.json" -Raw | ConvertFrom-Json $dropPrefix = $jsonContent.VstsDropBuildArtifact.VstsDropUrl -replace 'https://devdiv.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/' -replace '/nugets' Write-Host "##vso[task.setvariable variable=ReleaseDropPrefix]$dropPrefix" displayName: Set variable ReleaseDropPrefix + condition: and(succeeded(), ne(variables['DOTNET_PLATFORMS'], '')) # Download nugets drop created by nuget-msi-convert/job/v4.yml and publish to maestro - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@1 @@ -179,6 +191,15 @@ stages: dropServiceURI: https://devdiv.artifacts.visualstudio.com/DefaultCollection buildNumber: $(ReleaseDropPrefix)/nugets destinationPath: $(Build.StagingDirectory)\nuget-signed + condition: and(succeeded(), ne(variables['DOTNET_PLATFORMS'], '')) + + # Download signed nugets from pipeline artifact when nuget-msi-convert was skipped + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: '${{ parameters.uploadPrefix }}nuget-signed' + downloadPath: $(Build.StagingDirectory)\nuget-signed + displayName: Download signed nugets from pipeline artifact + condition: and(succeeded(), eq(variables['DOTNET_PLATFORMS'], '')) - script: make -C $(Build.SourcesDirectory)/dotnet setup-publish-bar-manifest displayName: make setup-publish-bar-manifest @@ -194,6 +215,9 @@ stages: exit 0; } } + # Fallback to iOS when no platforms are configured (e.g. ONLY_SHARPIE) + Write-Host "No platform variable was set, defaulting MaestroProjectPlatformName to 'iOS'" + Write-Host "##vso[task.setvariable variable=MaestroProjectPlatformName]iOS" displayName: Set maestro project variable - task: AzureCLI@2 diff --git a/tools/devops/automation/templates/tests-stage.yml b/tools/devops/automation/templates/tests-stage.yml index 0f772b9a4aa6..8b068f7287f9 100644 --- a/tools/devops/automation/templates/tests-stage.yml +++ b/tools/devops/automation/templates/tests-stage.yml @@ -198,6 +198,7 @@ stages: - stage: build_macos_tests displayName: '${{ parameters.stageDisplayNamePrefix }}Build macOS tests' dependsOn: [configure_build] + condition: and(succeeded(), ne(dependencies.configure_build.outputs['configure.configure_platforms.DOTNET_PLATFORMS'], '')) jobs: - template: ./build/build-mac-tests-stage.yml parameters: diff --git a/tools/sharpie/Makefile b/tools/sharpie/Makefile index f67363bb2827..3784d1e97dcb 100644 --- a/tools/sharpie/Makefile +++ b/tools/sharpie/Makefile @@ -28,7 +28,7 @@ $(SHARPIE_BIND_TOOL_NUPKG): $(Sharpie.Bind_dependencies) all-local:: $(DOTNET_NUPKG_DIR)/$(SHARPIE_BIND_TOOL_NUPKG_NAME) $(DOTNET_NUPKG_DIR)/$(SHARPIE_BIND_TOOL_NUPKG_NAME): $(SHARPIE_BIND_TOOL_NUPKG) $(Q) mkdir -p $(dir $@) - $(Q) $(CP) $< $@ + $(Q) $(CP) $(dir $<)/*.nupkg $(dir $@) run-tests: $(Sharpie.Bind_dependencies) $(Q_BUILD) $(DOTNET) test $(TOP)/tests/sharpie/Sharpie.Bind.Tests/Sharpie.Bind.Tests.csproj --logger "console;verbosity=detailed" $(DOTNET_BUILD_VERBOSITY) -bl:$@.binlog diff --git a/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj b/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj index ce9a63328354..5bd06cb564ff 100644 --- a/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj +++ b/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj @@ -13,6 +13,7 @@ osx-arm64 true sharpie + true $(NETCoreSdkRuntimeIdentifier) From 58eceac7d13bbe19441a9f8192a6863dff2668cb Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 27 Feb 2026 16:30:11 +0100 Subject: [PATCH 05/12] [devops] Skip macOS test results when neither macOS nor Mac Catalyst is enabled. (#24793) --- .../scripts/TestConfiguration.Tests.ps1 | 71 +++++++++++++++++++ .../automation/scripts/TestConfiguration.psm1 | 9 +++ .../devops/automation/templates/mac/stage.yml | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 b/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 index cbeff72d6c3b..2fca912bec5b 100644 --- a/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 +++ b/tools/devops/automation/scripts/TestConfiguration.Tests.ps1 @@ -358,4 +358,75 @@ Describe 'Get-TestConfiguration' { "@ } + Context 'macOS tests excluded when platforms disabled' { + It "excludes mac tests when neither macOS nor MacCatalyst is enabled" { + $macTestConfigs = @" +[ + { + "label": "cecil", + "splitByPlatforms": "false", + "testPrefix": "simulator_tests" + }, + { + "label": "mac_monterey", + "displayName": "Tests on macOS Monterey (12)", + "splitByPlatforms": "false", + "testPrefix": "mac_12_m1", + "testStage": "mac_12_m1", + "isMacTest": true + } +] +"@ + $supportedPlatforms = @" +[ + { "platform": "iOS" }, + { "platform": "tvOS" } +] +"@ + # Only tvOS enabled — no macOS or MacCatalyst + $result = Get-TestConfiguration ` + -TestConfigurations $macTestConfigs ` + -SupportedPlatforms $supportedPlatforms ` + -EnabledPlatforms "tvOS" ` + -TestsLabels "test-labels" ` + -StatusContext "ctx" ` + -StageFilter "" + + $parsed = $result | ConvertFrom-Json + # cecil should be present, mac_monterey should not + $parsed.cecil | Should -Not -BeNullOrEmpty + $parsed.PSObject.Properties.Name | Should -Not -Contain "mac_monterey" + } + + It "includes mac tests when macOS is enabled" { + $macTestConfigs = @" +[ + { + "label": "mac_monterey", + "displayName": "Tests on macOS Monterey (12)", + "splitByPlatforms": "false", + "testPrefix": "mac_12_m1", + "testStage": "mac_12_m1", + "isMacTest": true + } +] +"@ + $supportedPlatforms = @" +[ + { "platform": "macOS" } +] +"@ + $result = Get-TestConfiguration ` + -TestConfigurations $macTestConfigs ` + -SupportedPlatforms $supportedPlatforms ` + -EnabledPlatforms "macOS" ` + -TestsLabels "test-labels" ` + -StatusContext "ctx" ` + -StageFilter "" + + $parsed = $result | ConvertFrom-Json + $parsed.mac_monterey | Should -Not -BeNullOrEmpty + } + } + } diff --git a/tools/devops/automation/scripts/TestConfiguration.psm1 b/tools/devops/automation/scripts/TestConfiguration.psm1 index 61340c7eb7d1..ccd57ca19f7e 100644 --- a/tools/devops/automation/scripts/TestConfiguration.psm1 +++ b/tools/devops/automation/scripts/TestConfiguration.psm1 @@ -42,6 +42,15 @@ class TestConfiguration { Write-Host "Test $label with testStage '$testStage' is included, because there's no stage filter set" } + # Skip macOS tests if neither macOS nor MacCatalyst platforms are enabled + if ($config.isMacTest -eq "true" -or $config.isMacTest -eq $true) { + $hasMacPlatform = ($this.enabledPlatforms -contains "macOS") -or ($this.enabledPlatforms -contains "MacCatalyst") + if (-not $hasMacPlatform) { + Write-Host "Skipping mac test $label - neither macOS nor MacCatalyst platforms are enabled" + continue + } + } + $vars = [ordered]@{} # set common variables $vars["LABEL"] = $label diff --git a/tools/devops/automation/templates/mac/stage.yml b/tools/devops/automation/templates/mac/stage.yml index bbe10a52975f..a7fc6657df50 100644 --- a/tools/devops/automation/templates/mac/stage.yml +++ b/tools/devops/automation/templates/mac/stage.yml @@ -58,7 +58,7 @@ stages: dependsOn: - build_macos_tests - configure_build - condition: and(succeeded(), eq(stageDependencies.configure_build.outputs['configure.decisions.RUN_MAC_TESTS'], 'true')) + condition: and(succeeded(), eq(dependencies.configure_build.outputs['configure.decisions.RUN_MAC_TESTS'], 'true')) variables: GITHUB_FAILURE_COMMENT_FILE: $(System.DefaultWorkingDirectory)/github-comment-file.md From 706d64601ef02e9f465219aa87a9ef72e9a4f1db Mon Sep 17 00:00:00 2001 From: "Kirill O." <15909793+noiseonwires@users.noreply.github.com> Date: Mon, 2 Mar 2026 15:50:20 +0100 Subject: [PATCH 06/12] Include .mobile.props for DTB (fix for VS Code) (#24801) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR makes a change to improve the Hot Reload experience for .NET MAUI iOS device builds in VS Code: In VS Code, design-time builds did not receive the correct RuntimeIdentifier for iOS device targets — they defaulted to iossimulator-x64. This caused Roslyn to resolve the wrong baseline assemblies, that broke Hot Reload. The .mobile.props mechanism (already used by VS on Windows) solves this. As discussed with Mauro and Tomas, the better solution is not to introduce a new parameter, but add "DesignTimeBuild" as one of the triggers for the condition. This is safe for both VS and VS Code and should not cause any side effects. --------- Co-authored-by: Kirill Ovchinnikov --- dotnet/targets/Xamarin.Shared.Sdk.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index 3559642265c8..34a4351bd1f8 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -15,8 +15,8 @@ <_MobilePropsPath>$(_MobilePropsDir)$(MSBuildProjectName).mobile.props - - + + From 5ae1b9243165b4d5250d374c9d77674bd3dd1938 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 3 Mar 2026 10:40:17 +0100 Subject: [PATCH 07/12] [Foundation] Add [NullAllowed] to NSBundle members. Fixes #24803. (#24805) Add missing [NullAllowed] attributes on return types and parameters for Foundation.NSBundle members as reported by xtro-sharpie tests. Remove the corresponding entries from the ignore files. Fixes https://github.com/dotnet/macios/issues/24803. --- src/foundation.cs | 69 +++++++++++++++---- .../MacCatalyst-UIKit.ignore | 1 - .../common-Foundation.ignore | 55 --------------- .../api-annotations-dotnet/iOS-UIKit.ignore | 1 - .../macOS-AppKit.ignore | 5 -- .../api-annotations-dotnet/tvOS-UIKit.ignore | 1 - 6 files changed, 55 insertions(+), 77 deletions(-) diff --git a/src/foundation.cs b/src/foundation.cs index 85df5c4e6ec4..8c8747d267d7 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -14100,6 +14100,7 @@ partial interface NSBundle { [Export ("bundleWithPath:")] [Static] + [return: NullAllowed] NSBundle FromPath (string path); [DesignatedInitializer] @@ -14112,6 +14113,7 @@ partial interface NSBundle { [Export ("bundleWithIdentifier:")] [Static] + [return: NullAllowed] NSBundle FromIdentifier (string str); #if !XAMCORE_5_0 @@ -14156,48 +14158,62 @@ partial interface NSBundle { string BundlePath { get; } [Export ("resourcePath")] + [NullAllowed] string ResourcePath { get; } [Export ("executablePath")] + [NullAllowed] string ExecutablePath { get; } [Export ("pathForAuxiliaryExecutable:")] + [return: NullAllowed] string PathForAuxiliaryExecutable (string s); [Export ("privateFrameworksPath")] + [NullAllowed] string PrivateFrameworksPath { get; } [Export ("sharedFrameworksPath")] + [NullAllowed] string SharedFrameworksPath { get; } [Export ("sharedSupportPath")] + [NullAllowed] string SharedSupportPath { get; } [Export ("builtInPlugInsPath")] + [NullAllowed] string BuiltinPluginsPath { get; } [Export ("bundleIdentifier")] + [NullAllowed] string BundleIdentifier { get; } [Export ("classNamed:")] + [return: NullAllowed] Class ClassNamed (string className); [Export ("principalClass")] + [NullAllowed] Class PrincipalClass { get; } [Export ("pathForResource:ofType:inDirectory:")] [Static] - string PathForResourceAbsolute (string name, [NullAllowed] string ofType, string bundleDirectory); + [return: NullAllowed] + string PathForResourceAbsolute ([NullAllowed] string name, [NullAllowed] string ofType, string bundleDirectory); [Export ("pathForResource:ofType:")] - string PathForResource (string name, [NullAllowed] string ofType); + [return: NullAllowed] + string PathForResource ([NullAllowed] string name, [NullAllowed] string ofType); [Export ("pathForResource:ofType:inDirectory:")] - string PathForResource (string name, [NullAllowed] string ofType, [NullAllowed] string subpath); + [return: NullAllowed] + string PathForResource ([NullAllowed] string name, [NullAllowed] string ofType, [NullAllowed] string subpath); [Export ("pathForResource:ofType:inDirectory:forLocalization:")] - string PathForResource (string name, [NullAllowed] string ofType, string subpath, string localizationName); + [return: NullAllowed] + string PathForResource ([NullAllowed] string name, [NullAllowed] string ofType, [NullAllowed] string subpath, [NullAllowed] string localizationName); /// Get a localized version of the string for the specified key in the specified table. /// The key to lookup @@ -14208,12 +14224,15 @@ partial interface NSBundle { NSString GetLocalizedString ([NullAllowed] NSString key, [NullAllowed] NSString value, [NullAllowed] NSString table); [Export ("objectForInfoDictionaryKey:")] + [return: NullAllowed] NSObject ObjectForInfoDictionary (string key); [Export ("developmentLocalization")] + [NullAllowed] string DevelopmentLocalization { get; } [Export ("infoDictionary")] + [NullAllowed] NSDictionary InfoDictionary { get; } // Additions from AppKit @@ -14251,6 +14270,7 @@ partial interface NSBundle { [NoMacCatalyst] [NoTV] [Export ("pathForImageResource:")] + [return: NullAllowed] string PathForImageResource (string resource); /// To be added. @@ -14261,6 +14281,7 @@ partial interface NSBundle { [NoMacCatalyst] [NoTV] [Export ("pathForSoundResource:")] + [return: NullAllowed] string PathForSoundResource (string resource); /// To be added. @@ -14271,6 +14292,7 @@ partial interface NSBundle { [NoMacCatalyst] [NoTV] [Export ("URLForImageResource:")] + [return: NullAllowed] NSUrl GetUrlForImageResource (string resource); /// To be added. @@ -14281,6 +14303,7 @@ partial interface NSBundle { [NoMacCatalyst] [NoTV] [Export ("contextHelpForKey:")] + [return: NullAllowed] NSAttributedString GetContextHelp (string key); // http://developer.apple.com/library/ios/#documentation/uikit/reference/NSBundle_UIKitAdditions/Introduction/Introduction.html @@ -14299,36 +14322,45 @@ partial interface NSBundle { [NoMac] [MacCatalyst (13, 1)] [Export ("loadNibNamed:owner:options:")] + [return: NullAllowed] NSArray LoadNib (string nibName, [NullAllowed] NSObject owner, [NullAllowed] NSDictionary options); [Export ("bundleURL")] NSUrl BundleUrl { get; } [Export ("resourceURL")] + [NullAllowed] NSUrl ResourceUrl { get; } [Export ("executableURL")] + [NullAllowed] NSUrl ExecutableUrl { get; } [Export ("URLForAuxiliaryExecutable:")] + [return: NullAllowed] NSUrl UrlForAuxiliaryExecutable (string executable); [Export ("privateFrameworksURL")] + [NullAllowed] NSUrl PrivateFrameworksUrl { get; } [Export ("sharedFrameworksURL")] + [NullAllowed] NSUrl SharedFrameworksUrl { get; } [Export ("sharedSupportURL")] + [NullAllowed] NSUrl SharedSupportUrl { get; } [Export ("builtInPlugInsURL")] + [NullAllowed] NSUrl BuiltInPluginsUrl { get; } [Export ("initWithURL:")] NativeHandle Constructor (NSUrl url); [Static, Export ("bundleWithURL:")] + [return: NullAllowed] NSBundle FromUrl (NSUrl url); [Export ("preferredLocalizations")] @@ -14338,37 +14370,45 @@ partial interface NSBundle { string [] Localizations { get; } [Export ("appStoreReceiptURL")] + [NullAllowed] NSUrl AppStoreReceiptUrl { get; } [Export ("pathsForResourcesOfType:inDirectory:")] - string [] PathsForResources (string fileExtension, [NullAllowed] string subDirectory); + string [] PathsForResources ([NullAllowed] string fileExtension, [NullAllowed] string subDirectory); [Export ("pathsForResourcesOfType:inDirectory:forLocalization:")] - string [] PathsForResources (string fileExtension, [NullAllowed] string subDirectory, [NullAllowed] string localizationName); + string [] PathsForResources ([NullAllowed] string fileExtension, [NullAllowed] string subDirectory, [NullAllowed] string localizationName); [Static, Export ("pathsForResourcesOfType:inDirectory:")] - string [] GetPathsForResources (string fileExtension, string bundlePath); + string [] GetPathsForResources ([NullAllowed] string fileExtension, string bundlePath); [Static, Export ("URLForResource:withExtension:subdirectory:inBundleWithURL:")] - NSUrl GetUrlForResource (string name, string fileExtension, [NullAllowed] string subdirectory, NSUrl bundleURL); + [return: NullAllowed] + NSUrl GetUrlForResource ([NullAllowed] string name, [NullAllowed] string fileExtension, [NullAllowed] string subdirectory, NSUrl bundleURL); [Static, Export ("URLsForResourcesWithExtension:subdirectory:inBundleWithURL:")] - NSUrl [] GetUrlsForResourcesWithExtension (string fileExtension, [NullAllowed] string subdirectory, NSUrl bundleURL); + [return: NullAllowed] + NSUrl [] GetUrlsForResourcesWithExtension ([NullAllowed] string fileExtension, [NullAllowed] string subdirectory, NSUrl bundleURL); [Export ("URLForResource:withExtension:")] - NSUrl GetUrlForResource (string name, string fileExtension); + [return: NullAllowed] + NSUrl GetUrlForResource ([NullAllowed] string name, [NullAllowed] string fileExtension); [Export ("URLForResource:withExtension:subdirectory:")] - NSUrl GetUrlForResource (string name, string fileExtension, [NullAllowed] string subdirectory); + [return: NullAllowed] + NSUrl GetUrlForResource ([NullAllowed] string name, [NullAllowed] string fileExtension, [NullAllowed] string subdirectory); [Export ("URLForResource:withExtension:subdirectory:localization:")] - NSUrl GetUrlForResource (string name, string fileExtension, [NullAllowed] string subdirectory, [NullAllowed] string localizationName); + [return: NullAllowed] + NSUrl GetUrlForResource ([NullAllowed] string name, [NullAllowed] string fileExtension, [NullAllowed] string subdirectory, [NullAllowed] string localizationName); [Export ("URLsForResourcesWithExtension:subdirectory:")] - NSUrl [] GetUrlsForResourcesWithExtension (string fileExtension, [NullAllowed] string subdirectory); + [return: NullAllowed] + NSUrl [] GetUrlsForResourcesWithExtension ([NullAllowed] string fileExtension, [NullAllowed] string subdirectory); [Export ("URLsForResourcesWithExtension:subdirectory:localization:")] - NSUrl [] GetUrlsForResourcesWithExtension (string fileExtension, [NullAllowed] string subdirectory, [NullAllowed] string localizationName); + [return: NullAllowed] + NSUrl [] GetUrlsForResourcesWithExtension ([NullAllowed] string fileExtension, [NullAllowed] string subdirectory, [NullAllowed] string localizationName); [NoMac] [MacCatalyst (13, 1)] @@ -19600,6 +19640,7 @@ partial interface NSBundle { [NoMacCatalyst] [NoTV] [Export ("imageForResource:")] + [return: NullAllowed] NSImage ImageForResource (string name); } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore index e815630e7b2b..fc6cd3acc842 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore @@ -142,7 +142,6 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIPickerViewDelegate::GetAttributedTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSProgress UIKit.UIDocument::get_Progress()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIManagedDocument::ConfigurePersistentStoreCoordinator(Foundation.NSUrl,System.String,System.String,Foundation.NSDictionary,Foundation.NSError)' is missing an [NullAllowed] on parameter #2 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore index d285ab995faf..de328141b7b0 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore @@ -913,9 +913,6 @@ !missing-null-allowed! 'Foundation.INSUrlProtocolClient Foundation.NSUrlProtocol::get_Client()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString Foundation.NSFormatter::GetAttributedString(Foundation.NSObject,Foundation.NSDictionary`2)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'Foundation.NSAttributedString Foundation.NSFormatter::GetAttributedString(Foundation.NSObject,Foundation.NSDictionary`2)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSBundle Foundation.NSBundle::FromIdentifier(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSBundle Foundation.NSBundle::FromPath(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSBundle Foundation.NSBundle::FromUrl(Foundation.NSUrl)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSCachedUrlResponse Foundation.NSUrlCache::CachedResponseForRequest(Foundation.NSUrlRequest)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSCachedUrlResponse Foundation.NSUrlProtocol::get_CachedResponse()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSData Foundation.NSData::FromFile(System.String)' is missing an [NullAllowed] on return type @@ -951,7 +948,6 @@ !missing-null-allowed! 'Foundation.NSDecimalNumber Foundation.NSDecimalNumber::Multiply(Foundation.NSDecimalNumber,Foundation.NSObject)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'Foundation.NSDecimalNumber Foundation.NSDecimalNumber::Rounding(Foundation.NSObject)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'Foundation.NSDecimalNumber Foundation.NSDecimalNumber::Subtract(Foundation.NSDecimalNumber,Foundation.NSObject)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSDictionary Foundation.NSBundle::get_InfoDictionary()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSDictionary Foundation.NSCachedUrlResponse::get_UserInfo()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSDictionary Foundation.NSDirectoryEnumerator::get_DirectoryAttributes()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSDictionary Foundation.NSDirectoryEnumerator::get_FileAttributes()' is missing an [NullAllowed] on return type @@ -998,7 +994,6 @@ !missing-null-allowed! 'Foundation.NSNumber[] Foundation.NSHttpCookie::get_PortList()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject Foundation.NSAttributedString::GetAttribute(System.String,System.IntPtr,Foundation.NSRange&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject Foundation.NSAttributedString::GetAttribute(System.String,System.IntPtr,Foundation.NSRange&,Foundation.NSRange)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject Foundation.NSBundle::ObjectForInfoDictionary(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject Foundation.NSCache::ObjectForKey(Foundation.NSObject)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject Foundation.NSEnumerator::NextObject()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSObject Foundation.NSException::get_UserInfo()' is missing an [NullAllowed] on return type @@ -1035,26 +1030,6 @@ !missing-null-allowed! 'Foundation.NSTimeZone Foundation.NSTimeZone::FromName(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSTimeZone Foundation.NSTimeZone::FromName(System.String,Foundation.NSData)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'Foundation.NSTimeZone Foundation.NSTimeZone::FromName(System.String,Foundation.NSData)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_AppStoreReceiptUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_BuiltInPluginsUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_ExecutableUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_PrivateFrameworksUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_ResourceUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_SharedFrameworksUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::get_SharedSupportUrl()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,Foundation.NSUrl)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,Foundation.NSUrl)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,Foundation.NSUrl)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::UrlForAuxiliaryExecutable(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetContainerUrl(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrl(Foundation.NSSearchPathDirectory,Foundation.NSSearchPathDomain,Foundation.NSUrl,System.Boolean,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrlForPublishingUbiquitousItem(Foundation.NSUrl,Foundation.NSDate&,Foundation.NSError&)' is missing an [NullAllowed] on return type @@ -1078,12 +1053,6 @@ !missing-null-allowed! 'Foundation.NSUrl Foundation.NSUrlRequest::get_MainDocumentURL()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSUrlRequest::get_Url()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSUrlResponse::get_Url()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String,Foundation.NSUrl)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String,Foundation.NSUrl)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSBundle::GetUrlsForResourcesWithExtension(System.String,System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSFileManager::GetDirectoryContent(Foundation.NSUrl,Foundation.NSArray,Foundation.NSDirectoryEnumerationOptions,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl[] Foundation.NSFileManager::GetMountedVolumes(Foundation.NSArray,Foundation.NSVolumeEnumerationOptions)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrlComponents Foundation.NSUrlComponents::FromString(System.String)' is missing an [NullAllowed] on return type @@ -1095,8 +1064,6 @@ !missing-null-allowed! 'Foundation.NSUrlSessionUploadTask Foundation.NSUrlSession::CreateUploadTask(Foundation.NSUrlRequest,Foundation.NSData,Foundation.NSUrlSessionResponse)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'Foundation.NSValue Foundation.NSValue::ValueFromNonretainedObject(Foundation.NSObject)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'Foundation.NSXpcConnection Foundation.NSXpcConnection::get_CurrentConnection()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ObjCRuntime.Class Foundation.NSBundle::ClassNamed(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ObjCRuntime.Class Foundation.NSBundle::get_PrincipalClass()' is missing an [NullAllowed] on return type !missing-null-allowed! 'ObjCRuntime.Class Foundation.NSKeyedUnarchiverDelegate::CannotDecodeClass(Foundation.NSKeyedUnarchiver,System.String,System.String[])' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean Foundation.NSFileManager::CreateFile(System.String,Foundation.NSData,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean Foundation.NSPredicate::EvaluateWithObject(Foundation.NSObject)' is missing an [NullAllowed] on parameter #0 @@ -1104,25 +1071,6 @@ !missing-null-allowed! 'System.Boolean Foundation.NSPredicate::EvaluateWithObject(Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean Foundation.NSUrl::SetResourceValue(Foundation.NSObject,Foundation.NSString,Foundation.NSError&)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.UIntPtr Foundation.NSString::DetectStringEncoding(Foundation.NSData,Foundation.NSDictionary,System.String&,System.Boolean&)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String Foundation.NSBundle::get_BuiltinPluginsPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_BundleIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_DevelopmentLocalization()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_ExecutablePath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_PrivateFrameworksPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_ResourcePath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_SharedFrameworksPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::get_SharedSupportPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForAuxiliaryExecutable(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #2 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #3 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResource(System.String,System.String,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResourceAbsolute(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForResourceAbsolute(System.String,System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String Foundation.NSDate::DescriptionWithLocale(Foundation.NSLocale)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.String Foundation.NSDateComponentsFormatter::LocalizedStringFromDateComponents(Foundation.NSDateComponents,Foundation.NSDateComponentsFormatterUnitsStyle)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String Foundation.NSDateComponentsFormatter::StringForObjectValue(Foundation.NSObject)' is missing an [NullAllowed] on return type @@ -1167,9 +1115,6 @@ !missing-null-allowed! 'System.String Foundation.NSUrlResponse::get_SuggestedFilename()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String Foundation.NSUrlResponse::get_TextEncodingName()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String Foundation.NSXpcConnection::get_ServiceName()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] Foundation.NSBundle::GetPathsForResources(System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String[] Foundation.NSBundle::PathsForResources(System.String,System.String)' is missing an [NullAllowed] on parameter #0 -!missing-null-allowed! 'System.String[] Foundation.NSBundle::PathsForResources(System.String,System.String,System.String)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.String[] Foundation.NSError::get_LocalizedRecoveryOptions()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String[] Foundation.NSFileManager::ComponentsToDisplay(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String[] Foundation.NSFileManager::GetDirectoryContent(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore index 9d5864e86cad..aba256ee0a23 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore @@ -146,7 +146,6 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIPickerViewDelegate::GetAttributedTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSProgress UIKit.UIDocument::get_Progress()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIManagedDocument::ConfigurePersistentStoreCoordinator(Foundation.NSUrl,System.String,System.String,Foundation.NSDictionary,Foundation.NSError)' is missing an [NullAllowed] on parameter #2 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore index e275a38d4b9f..9a3f3b3cbe9e 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore @@ -291,7 +291,6 @@ !missing-null-allowed! 'AppKit.NSImage AppKit.NSSharingServiceDelegate::TransitionImageForShareItem(AppKit.NSSharingService,AppKit.INSPasteboardWriting,CoreGraphics.CGRect)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSImage AppKit.NSTableView::GetIndicatorImage(AppKit.NSTableColumn)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSImage AppKit.NSWorkspace::IconForFiles(System.String[])' is missing an [NullAllowed] on return type -!missing-null-allowed! 'AppKit.NSImage Foundation.NSBundle::ImageForResource(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSImageRep AppKit.NSImage::BestRepresentation(CoreGraphics.CGRect,AppKit.NSGraphicsContext,Foundation.NSDictionary)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSImageRep AppKit.NSImageRep::ImageRepFromFile(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'AppKit.NSImageRep AppKit.NSImageRep::ImageRepFromPasteboard(AppKit.NSPasteboard)' is missing an [NullAllowed] on return type @@ -415,7 +414,6 @@ !missing-null-allowed! 'Foundation.NSArray AppKit.NSWindow::WindowNumbersWithOptions(AppKit.NSWindowNumberListOptions)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSArray[] AppKit.NSFontManager::AvailableMembersOfFontFamily(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString AppKit.NSHelpManager::Context(Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString Foundation.NSBundle::GetContextHelp(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSBundle AppKit.NSViewController::get_NibBundle()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSData AppKit.NSColorSpace::get_ICCProfileData()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSData AppKit.NSDocument::GetAsData(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type @@ -513,7 +511,6 @@ !missing-null-allowed! 'Foundation.NSUrl AppKit.NSWorkspace::DesktopImageUrl(AppKit.NSScreen)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl AppKit.NSWorkspace::UrlForApplication(Foundation.NSUrl)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl AppKit.NSWorkspace::UrlForApplication(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSBundle::GetUrlForImageResource(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl[] AppKit.NSDocumentController::UrlsFromRunningOpenPanel()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl[] AppKit.NSSharingService::get_AttachmentFileUrls()' is missing an [NullAllowed] on return type !missing-null-allowed! 'ObjCRuntime.Class AppKit.NSDocumentController::DocumentClassForType(System.String)' is missing an [NullAllowed] on return type @@ -609,8 +606,6 @@ !missing-null-allowed! 'System.String AppKit.NSViewController::get_NibName()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String AppKit.NSWindowController::get_WindowNibName()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String AppKit.NSWindowController::get_WindowNibPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForImageResource(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String Foundation.NSBundle::PathForSoundResource(System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String[] AppKit.NSFontManager::AvailableFontNamesWithTraits(AppKit.NSFontTraitMask)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String[] AppKit.NSPasteboard::get_Types()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.String[] AppKit.NSSpellChecker::CompletionsForPartialWordRange(Foundation.NSRange,System.String,System.String,System.IntPtr)' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore index 62183597a9dd..de00349fbb7a 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore @@ -178,7 +178,6 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIScrollView::TouchesShouldBegin(Foundation.NSSet,UIKit.UIEvent,UIKit.UIView)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UISplitViewControllerDelegate::EventShowDetailViewController(UIKit.UISplitViewController,UIKit.UIViewController,Foundation.NSObject)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Boolean UIKit.UISplitViewControllerDelegate::EventShowViewController(UIKit.UISplitViewController,UIKit.UIViewController,Foundation.NSObject)' is missing an [NullAllowed] on parameter #2 From 716b8b19bf9e179c1161765abdf5d7ce6fa0ba48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 09:41:26 +0000 Subject: [PATCH 08/12] Reset files to net11.0 Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Version.Details.props - eng/common/* --- NuGet.config | 23 +- eng/Version.Details.props | 54 +-- eng/Version.Details.xml | 112 ++--- eng/common/SetupNugetSources.ps1 | 17 +- eng/common/SetupNugetSources.sh | 17 +- eng/common/build.sh | 2 +- eng/common/core-templates/job/job.yml | 8 + .../job/publish-build-assets.yml | 16 +- .../core-templates/post-build/post-build.yml | 459 +++++++++--------- .../core-templates/steps/generate-sbom.yml | 2 +- .../steps/install-microbuild-impl.yml | 34 ++ .../steps/install-microbuild.yml | 64 +-- .../core-templates/steps/source-build.yml | 2 +- .../steps/source-index-stage1-publish.yml | 8 +- eng/common/cross/build-rootfs.sh | 8 +- eng/common/darc-init.sh | 2 +- eng/common/dotnet-install.sh | 2 +- eng/common/dotnet.sh | 2 +- eng/common/internal-feed-operations.sh | 2 +- eng/common/native/install-dependencies.sh | 11 +- eng/common/post-build/redact-logs.ps1 | 3 +- eng/common/tools.ps1 | 9 +- eng/common/tools.sh | 4 - global.json | 6 +- 24 files changed, 411 insertions(+), 456 deletions(-) create mode 100644 eng/common/core-templates/steps/install-microbuild-impl.yml diff --git a/NuGet.config b/NuGet.config index 375ee513cb1f..c147ea22c6fe 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,11 +9,10 @@ - - + - + @@ -27,27 +26,13 @@ - - + + - - - - - - - - - - - - - - diff --git a/eng/Version.Details.props b/eng/Version.Details.props index b1222f946203..9f5fce8f353b 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,34 +6,25 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26126.103 - 10.0.0-beta.26126.103 - 0.11.5-alpha.26070.104 - 10.0.0-beta.26126.103 - 10.0.3-servicing.26070.104 - 10.0.3 - 10.0.3 - 10.0.300-preview.26126.103 - 10.0.3 - 10.0.300-preview.26126.103 + 11.0.0-beta.26124.102 + 11.0.0-beta.26124.102 + 0.11.5-preview.26124.102 + 11.0.0-beta.26124.102 + 11.0.0-preview.3.26124.102 + 11.0.0-preview.3.26124.102 + 11.0.0-preview.3.26124.102 + 11.0.100-preview.3.26124.102 + 11.0.0-preview.3.26124.102 + 11.0.100-preview.3.26124.102 26.0.11017 - 18.5.9227 - 26.2.9000 + 26.2.10218 26.0.11017 - 18.5.9227 - 26.2.9000 + 26.2.10218 26.0.11017 - 15.5.9227 - 26.2.9000 + 26.2.10218 26.0.11017 - 18.5.9227 - 26.2.9000 - - 18.0.9617 - 18.0.9617 - 15.0.9617 - 18.0.9617 + 26.2.10218 11.0.0-prerelease.26117.1 @@ -52,22 +43,13 @@ This file should be imported by eng/Versions.props $(MicrosoftTemplateEngineAuthoringTasksPackageVersion) $(MicrosoftiOSSdknet100_260PackageVersion) - $(MicrosoftiOSSdknet90_185PackageVersion) - $(MicrosoftiOSSdknet90_262PackageVersion) + $(MicrosoftiOSSdknet100_262PackageVersion) $(MicrosoftMacCatalystSdknet100_260PackageVersion) - $(MicrosoftMacCatalystSdknet90_185PackageVersion) - $(MicrosoftMacCatalystSdknet90_262PackageVersion) + $(MicrosoftMacCatalystSdknet100_262PackageVersion) $(MicrosoftmacOSSdknet100_260PackageVersion) - $(MicrosoftmacOSSdknet90_155PackageVersion) - $(MicrosoftmacOSSdknet90_262PackageVersion) + $(MicrosoftmacOSSdknet100_262PackageVersion) $(MicrosofttvOSSdknet100_260PackageVersion) - $(MicrosofttvOSSdknet90_185PackageVersion) - $(MicrosofttvOSSdknet90_262PackageVersion) - - $(MicrosoftiOSSdknet90_180PackageVersion) - $(MicrosoftMacCatalystSdknet90_180PackageVersion) - $(MicrosoftmacOSSdknet90_150PackageVersion) - $(MicrosofttvOSSdknet90_180PackageVersion) + $(MicrosofttvOSSdknet100_262PackageVersion) $(MicrosoftDotNetXHarnessiOSSharedPackageVersion) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8aec5cd07e2a..ef6448a2c54d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,80 +1,29 @@ - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - 455f1358f39b4d38fa3893c327a45027c4a81843 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - 455f1358f39b4d38fa3893c327a45027c4a81843 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - 455f1358f39b4d38fa3893c327a45027c4a81843 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - 455f1358f39b4d38fa3893c327a45027c4a81843 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - 455f1358f39b4d38fa3893c327a45027c4a81843 - - - - https://github.com/dotnet/macios - 4681bf928d70aa79cff2c33ad324b3be9c62b66d - - - https://github.com/dotnet/macios - 4681bf928d70aa79cff2c33ad324b3be9c62b66d - - - https://github.com/dotnet/macios - 4681bf928d70aa79cff2c33ad324b3be9c62b66d - - - https://github.com/dotnet/macios - 4681bf928d70aa79cff2c33ad324b3be9c62b66d - - - - https://github.com/xamarin/xamarin-macios - 797d30720e5e629d23eb146935da94cb1b61047e - - - https://github.com/xamarin/xamarin-macios - 797d30720e5e629d23eb146935da94cb1b61047e - - - https://github.com/xamarin/xamarin-macios - 797d30720e5e629d23eb146935da94cb1b61047e - - - https://github.com/xamarin/xamarin-macios - 797d30720e5e629d23eb146935da94cb1b61047e - - - - https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b - - - https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b - - - https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b - - - https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 @@ -93,27 +42,44 @@ https://github.com/dotnet/macios 23eb1c2c9465fe76c810c8a69982c1254161f4b0 + + + https://github.com/dotnet/macios + dcec94e3699c1624db5555d32fc8ec33e62c63f8 + + + https://github.com/dotnet/macios + dcec94e3699c1624db5555d32fc8ec33e62c63f8 + + + https://github.com/dotnet/macios + dcec94e3699c1624db5555d32fc8ec33e62c63f8 + + + https://github.com/dotnet/macios + dcec94e3699c1624db5555d32fc8ec33e62c63f8 + - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 - + https://github.com/dotnet/xharness - 0eeaa60169fe6a95932d29d822e20eb225ce0143 + 88399512021dfa8b5f45d91f84c8ce6f0959b127 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + 36ea4de4a4409ace6bdf48c2dae2b6713f47c1b9 diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 65ed3a8adef0..fc8d618014e0 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -1,7 +1,6 @@ # This script adds internal feeds required to build commits that depend on internal package sources. For instance, -# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly, -# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present. -# In addition, this script also enables disabled internal Maestro (darc-int*) feeds. +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. # # Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # @@ -174,16 +173,4 @@ foreach ($dotnetVersion in $dotnetVersions) { } } -# Check for dotnet-eng and add dotnet-eng-internal if present -$dotnetEngSource = $sources.SelectSingleNode("add[@key='dotnet-eng']") -if ($dotnetEngSource -ne $null) { - AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-eng-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password -} - -# Check for dotnet-tools and add dotnet-tools-internal if present -$dotnetToolsSource = $sources.SelectSingleNode("add[@key='dotnet-tools']") -if ($dotnetToolsSource -ne $null) { - AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-tools-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password -} - $doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index b2163abbe71b..b97cc536379d 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash # This script adds internal feeds required to build commits that depend on internal package sources. For instance, -# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly, -# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present. -# In addition, this script also enables disabled internal Maestro (darc-int*) feeds. +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. # # Optionally, this script also adds a credential entry for each of the internal feeds if supplied. # @@ -174,18 +173,6 @@ for DotNetVersion in ${DotNetVersions[@]} ; do fi done -# Check for dotnet-eng and add dotnet-eng-internal if present -grep -i " /dev/null -if [ "$?" == "0" ]; then - AddOrEnablePackageSource "dotnet-eng-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$FeedSuffix" -fi - -# Check for dotnet-tools and add dotnet-tools-internal if present -grep -i " /dev/null -if [ "$?" == "0" ]; then - AddOrEnablePackageSource "dotnet-tools-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$FeedSuffix" -fi - # I want things split line by line PrevIFS=$IFS IFS=$'\n' diff --git a/eng/common/build.sh b/eng/common/build.sh index 9767bb411a4f..ec3e80d189ea 100644 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -92,7 +92,7 @@ runtime_source_feed='' runtime_source_feed_key='' properties=() -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" case "$opt" in -help|-h) diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 5ce518406198..748c4f07a64d 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -19,6 +19,8 @@ parameters: # publishing defaults artifacts: '' enableMicrobuild: false + enablePreviewMicrobuild: false + microbuildPluginVersion: 'latest' enableMicrobuildForMacAndLinux: false microbuildUseESRP: true enablePublishBuildArtifacts: false @@ -71,6 +73,8 @@ jobs: templateContext: ${{ parameters.templateContext }} variables: + - name: AllowPtrToDetectTestRunRetryFiles + value: true - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' @@ -128,6 +132,8 @@ jobs: - template: /eng/common/core-templates/steps/install-microbuild.yml parameters: enableMicrobuild: ${{ parameters.enableMicrobuild }} + enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }} + microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }} enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }} microbuildUseESRP: ${{ parameters.microbuildUseESRP }} continueOnError: ${{ parameters.continueOnError }} @@ -153,6 +159,8 @@ jobs: - template: /eng/common/core-templates/steps/cleanup-microbuild.yml parameters: enableMicrobuild: ${{ parameters.enableMicrobuild }} + enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }} + microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }} enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }} continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index b955fac6e13f..c9ee8ffd8f1d 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -91,8 +91,8 @@ jobs: fetchDepth: 3 clean: true - - ${{ if eq(parameters.isAssetlessBuild, 'false') }}: - - ${{ if eq(parameters.publishingVersion, 3) }}: + - ${{ if eq(parameters.isAssetlessBuild, 'false') }}: + - ${{ if eq(parameters.publishingVersion, 3) }}: - task: DownloadPipelineArtifact@2 displayName: Download Asset Manifests inputs: @@ -117,7 +117,7 @@ jobs: flattenFolders: true condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: NuGetAuthenticate@1 # Populate internal runtime variables. @@ -125,7 +125,7 @@ jobs: ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: parameters: legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw) - + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - task: AzureCLI@2 @@ -145,7 +145,7 @@ jobs: condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: powershell@2 displayName: Create ReleaseConfigs Artifact inputs: @@ -173,7 +173,7 @@ jobs: artifactName: AssetManifests displayName: 'Publish Merged Manifest' retryCountOnTaskFailure: 10 # for any logs being locked - sbomEnabled: false # we don't need SBOM for logs + sbomEnabled: false # we don't need SBOM for logs - template: /eng/common/core-templates/steps/publish-build-artifacts.yml parameters: @@ -190,7 +190,7 @@ jobs: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} is1ESPipeline: ${{ parameters.is1ESPipeline }} - + # Darc is targeting 8.0, so make sure it's installed - task: UseDotNet@2 inputs: @@ -218,4 +218,4 @@ jobs: - template: /eng/common/core-templates/steps/publish-logs.yml parameters: is1ESPipeline: ${{ parameters.is1ESPipeline }} - JobLabel: 'Publish_Artifacts_Logs' + JobLabel: 'Publish_Artifacts_Logs' diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index b942a79ef02d..29addfcf8e6f 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -1,106 +1,106 @@ parameters: - # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. - # Publishing V1 is no longer supported - # Publishing V2 is no longer supported - # Publishing V3 is the default - - name: publishingInfraVersion - displayName: Which version of publishing should be used to promote the build definition? - type: number - default: 3 - values: - - 3 - - - name: BARBuildId - displayName: BAR Build Id - type: number - default: 0 - - - name: PromoteToChannelIds - displayName: Channel to promote BARBuildId to - type: string - default: '' - - - name: enableSourceLinkValidation - displayName: Enable SourceLink validation - type: boolean - default: false - - - name: enableSigningValidation - displayName: Enable signing validation - type: boolean - default: true - - - name: enableSymbolValidation - displayName: Enable symbol validation - type: boolean - default: false - - - name: enableNugetValidation - displayName: Enable NuGet validation - type: boolean - default: true - - - name: publishInstallersAndChecksums - displayName: Publish installers and checksums - type: boolean - default: true - - - name: requireDefaultChannels - displayName: Fail the build if there are no default channel(s) registrations for the current build - type: boolean - default: false - - - name: SDLValidationParameters - type: object - default: - enable: false - publishGdn: false - continueOnError: false - params: '' - artifactNames: '' - downloadArtifacts: true - - - name: isAssetlessBuild - type: boolean - displayName: Is Assetless Build - default: false - - # These parameters let the user customize the call to sdk-task.ps1 for publishing - # symbols & general artifacts as well as for signing validation - - name: symbolPublishingAdditionalParameters - displayName: Symbol publishing additional parameters - type: string - default: '' - - - name: artifactsPublishingAdditionalParameters - displayName: Artifact publishing additional parameters - type: string - default: '' - - - name: signingValidationAdditionalParameters - displayName: Signing validation additional parameters - type: string - default: '' - - # Which stages should finish execution before post-build stages start - - name: validateDependsOn - type: object - default: - - build - - - name: publishDependsOn - type: object - default: - - Validate - - # Optional: Call asset publishing rather than running in a separate stage - - name: publishAssetsImmediately - type: boolean - default: false - - - name: is1ESPipeline - type: boolean - default: false +# Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. +# Publishing V1 is no longer supported +# Publishing V2 is no longer supported +# Publishing V3 is the default +- name: publishingInfraVersion + displayName: Which version of publishing should be used to promote the build definition? + type: number + default: 3 + values: + - 3 + +- name: BARBuildId + displayName: BAR Build Id + type: number + default: 0 + +- name: PromoteToChannelIds + displayName: Channel to promote BARBuildId to + type: string + default: '' + +- name: enableSourceLinkValidation + displayName: Enable SourceLink validation + type: boolean + default: false + +- name: enableSigningValidation + displayName: Enable signing validation + type: boolean + default: true + +- name: enableSymbolValidation + displayName: Enable symbol validation + type: boolean + default: false + +- name: enableNugetValidation + displayName: Enable NuGet validation + type: boolean + default: true + +- name: publishInstallersAndChecksums + displayName: Publish installers and checksums + type: boolean + default: true + +- name: requireDefaultChannels + displayName: Fail the build if there are no default channel(s) registrations for the current build + type: boolean + default: false + +- name: SDLValidationParameters + type: object + default: + enable: false + publishGdn: false + continueOnError: false + params: '' + artifactNames: '' + downloadArtifacts: true + +- name: isAssetlessBuild + type: boolean + displayName: Is Assetless Build + default: false + +# These parameters let the user customize the call to sdk-task.ps1 for publishing +# symbols & general artifacts as well as for signing validation +- name: symbolPublishingAdditionalParameters + displayName: Symbol publishing additional parameters + type: string + default: '' + +- name: artifactsPublishingAdditionalParameters + displayName: Artifact publishing additional parameters + type: string + default: '' + +- name: signingValidationAdditionalParameters + displayName: Signing validation additional parameters + type: string + default: '' + +# Which stages should finish execution before post-build stages start +- name: validateDependsOn + type: object + default: + - build + +- name: publishDependsOn + type: object + default: + - Validate + +# Optional: Call asset publishing rather than running in a separate stage +- name: publishAssetsImmediately + type: boolean + default: false + +- name: is1ESPipeline + type: boolean + default: false stages: - ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: @@ -108,10 +108,10 @@ stages: dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate Build Assets variables: - - template: /eng/common/core-templates/post-build/common-variables.yml - - template: /eng/common/core-templates/variables/pool-providers.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} + - template: /eng/common/core-templates/post-build/common-variables.yml + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} jobs: - job: displayName: NuGet Validation @@ -134,28 +134,28 @@ stages: demands: ImageOverride -equals windows.vs2026preview.scout.amd64 steps: - - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: displayName: Signing Validation @@ -169,7 +169,7 @@ stages: os: windows # If it's not devdiv, it's dnceng ${{ else }}: - ${{ if eq(parameters.is1ESPipeline, true) }}: + ${{ if eq(parameters.is1ESPipeline, true) }}: name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows @@ -177,46 +177,46 @@ stages: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2026preview.scout.amd64 steps: - - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - checkDownloadedFiles: true - - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@1 - displayName: 'Authenticate to AzDO Feeds' - - # Signing validation will optionally work with the buildmanifest file which is downloaded from - # Azure DevOps above. - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore -msbuildEngine vs - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' - ${{ parameters.signingValidationAdditionalParameters }} - - - template: /eng/common/core-templates/steps/publish-logs.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - StageLabel: 'Validation' - JobLabel: 'Signing' - BinlogToolVersion: $(BinlogToolVersion) + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + checkDownloadedFiles: true + + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to AzDO Feeds' + + # Signing validation will optionally work with the buildmanifest file which is downloaded from + # Azure DevOps above. + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task SigningValidation -restore -msbuildEngine vs + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' + ${{ parameters.signingValidationAdditionalParameters }} + + - template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + StageLabel: 'Validation' + JobLabel: 'Signing' + BinlogToolVersion: $(BinlogToolVersion) - job: displayName: SourceLink Validation @@ -230,7 +230,7 @@ stages: os: windows # If it's not devdiv, it's dnceng ${{ else }}: - ${{ if eq(parameters.is1ESPipeline, true) }}: + ${{ if eq(parameters.is1ESPipeline, true) }}: name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows @@ -238,33 +238,33 @@ stages: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2026preview.scout.amd64 steps: - - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: BlobArtifacts - checkDownloadedFiles: true - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) - -GHCommit $(Build.SourceVersion) - -SourcelinkCliVersion $(SourceLinkCLIVersion) - continueOnError: true + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + - task: DownloadBuildArtifacts@0 + displayName: Download Blob Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BlobArtifacts + checkDownloadedFiles: true + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) + -GHCommit $(Build.SourceVersion) + -SourcelinkCliVersion $(SourceLinkCLIVersion) + continueOnError: true - ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: - stage: publish_using_darc @@ -274,10 +274,10 @@ stages: dependsOn: ${{ parameters.validateDependsOn }} displayName: Publish using Darc variables: - - template: /eng/common/core-templates/post-build/common-variables.yml - - template: /eng/common/core-templates/variables/pool-providers.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} + - template: /eng/common/core-templates/post-build/common-variables.yml + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} jobs: - job: displayName: Publish Using Darc @@ -291,7 +291,7 @@ stages: os: windows # If it's not devdiv, it's dnceng ${{ else }}: - ${{ if eq(parameters.is1ESPipeline, true) }}: + ${{ if eq(parameters.is1ESPipeline, true) }}: name: NetCore1ESPool-Publishing-Internal image: windows.vs2022.amd64 os: windows @@ -299,34 +299,33 @@ stages: name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2022.amd64 steps: - - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - - task: NuGetAuthenticate@1 - - # Populate internal runtime variables. - - template: /eng/common/templates/steps/enable-internal-sources.yml - parameters: - legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw) - - - template: /eng/common/templates/steps/enable-internal-runtimes.yml - - # Darc is targeting 8.0, so make sure it's installed - - task: UseDotNet@2 - inputs: - version: 8.0.x - - - task: AzureCLI@2 - displayName: Publish Using Darc - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: ps - scriptLocation: scriptPath - scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: > + - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + - task: NuGetAuthenticate@1 + + # Populate internal runtime variables. + - template: /eng/common/templates/steps/enable-internal-sources.yml + parameters: + legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw) + + - template: /eng/common/templates/steps/enable-internal-runtimes.yml + + - task: UseDotNet@2 + inputs: + version: 8.0.x + + - task: AzureCLI@2 + displayName: Publish Using Darc + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(System.AccessToken)' diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index c05f65027979..003f7eae0fa5 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -5,7 +5,7 @@ # IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector. parameters: - PackageVersion: 10.0.0 + PackageVersion: 11.0.0 BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom diff --git a/eng/common/core-templates/steps/install-microbuild-impl.yml b/eng/common/core-templates/steps/install-microbuild-impl.yml new file mode 100644 index 000000000000..da22beb3f60c --- /dev/null +++ b/eng/common/core-templates/steps/install-microbuild-impl.yml @@ -0,0 +1,34 @@ +parameters: + - name: microbuildTaskInputs + type: object + default: {} + + - name: microbuildEnv + type: object + default: {} + + - name: enablePreviewMicrobuild + type: boolean + default: false + + - name: condition + type: string + + - name: continueOnError + type: boolean + +steps: +- ${{ if eq(parameters.enablePreviewMicrobuild, true) }}: + - task: MicroBuildSigningPluginPreview@4 + displayName: Install Preview MicroBuild plugin + inputs: ${{ parameters.microbuildTaskInputs }} + env: ${{ parameters.microbuildEnv }} + continueOnError: ${{ parameters.continueOnError }} + condition: ${{ parameters.condition }} +- ${{ else }}: + - task: MicroBuildSigningPlugin@4 + displayName: Install MicroBuild plugin + inputs: ${{ parameters.microbuildTaskInputs }} + env: ${{ parameters.microbuildEnv }} + continueOnError: ${{ parameters.continueOnError }} + condition: ${{ parameters.condition }} diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml index 553fce66b940..4f4b56ed2a6b 100644 --- a/eng/common/core-templates/steps/install-microbuild.yml +++ b/eng/common/core-templates/steps/install-microbuild.yml @@ -4,6 +4,8 @@ parameters: # Enable install tasks for MicroBuild on Mac and Linux # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT' enableMicrobuildForMacAndLinux: false + # Enable preview version of MB signing plugin + enablePreviewMicrobuild: false # Determines whether the ESRP service connection information should be passed to the signing plugin. # This overlaps with _SignType to some degree. We only need the service connection for real signing. # It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place. @@ -13,6 +15,8 @@ parameters: microbuildUseESRP: true # Microbuild installation directory microBuildOutputFolder: $(Agent.TempDirectory)/MicroBuild + # Microbuild version + microbuildPluginVersion: 'latest' continueOnError: false @@ -69,42 +73,46 @@ steps: # YAML expansion, and Windows vs. Linux/Mac uses different service connections. However, # we can avoid including the MB install step if not enabled at all. This avoids a bunch of # extra pipeline authorizations, since most pipelines do not sign on non-Windows. - - task: MicroBuildSigningPlugin@4 - displayName: Install MicroBuild plugin (Windows) - inputs: - signType: $(_SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ if eq(parameters.microbuildUseESRP, true) }}: - ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)' - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea - ${{ else }}: - ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca - env: - TeamName: $(_TeamName) - MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test')) - - - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}: - - task: MicroBuildSigningPlugin@4 - displayName: Install MicroBuild plugin (non-Windows) - inputs: + - template: /eng/common/core-templates/steps/install-microbuild-impl.yml@self + parameters: + enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }} + microbuildTaskInputs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - workingDirectory: ${{ parameters.microBuildOutputFolder }} + version: ${{ parameters.microbuildPluginVersion }} ${{ if eq(parameters.microbuildUseESRP, true) }}: ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)' ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39 + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea ${{ else }}: - ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc - env: + ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca + microbuildEnv: TeamName: $(_TeamName) MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real')) + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test')) + + - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}: + - template: /eng/common/core-templates/steps/install-microbuild-impl.yml@self + parameters: + enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }} + microbuildTaskInputs: + signType: $(_SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + version: ${{ parameters.microbuildPluginVersion }} + workingDirectory: ${{ parameters.microBuildOutputFolder }} + ${{ if eq(parameters.microbuildUseESRP, true) }}: + ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)' + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39 + ${{ else }}: + ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc + microbuildEnv: + TeamName: $(_TeamName) + MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real')) diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index b9c86c18ae42..acf16ed34963 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -24,7 +24,7 @@ steps: # in the default public locations. internalRuntimeDownloadArgs= if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey '$(dotnetbuilds-internal-container-read-token-base64)'' + internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' fi buildConfig=Release diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index e9a694afa58e..3ad83b8c3075 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -1,6 +1,6 @@ parameters: - sourceIndexUploadPackageVersion: 2.0.0-20250818.1 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250818.1 + sourceIndexUploadPackageVersion: 2.0.0-20250906.1 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250906.1 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json binlogPath: artifacts/log/Debug/Build.binlog @@ -14,8 +14,8 @@ steps: workingDirectory: $(Agent.TempDirectory) - script: | - $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools - $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools + $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools + $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools displayName: "Source Index: Download netsourceindex Tools" # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. workingDirectory: $(Agent.TempDirectory) diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 8abfb71f7275..ef97671fe6cb 100644 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -72,7 +72,7 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="13.4-RELEASE" +__FreeBSDBase="13.5-RELEASE" __FreeBSDPkg="1.21.3" __FreeBSDABI="13" __FreeBSDPackages="libunwind" @@ -295,9 +295,7 @@ while :; do ;; noble) # Ubuntu 24.04 __CodeName=noble - if [[ -z "$__LLDB_Package" ]]; then - __LLDB_Package="liblldb-19-dev" - fi + __LLDB_Package="liblldb-19-dev" ;; stretch) # Debian 9 __CodeName=stretch @@ -383,7 +381,7 @@ while :; do ;; freebsd14) __CodeName=freebsd - __FreeBSDBase="14.2-RELEASE" + __FreeBSDBase="14.3-RELEASE" __FreeBSDABI="14" __SkipUnmount=1 ;; diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index e889f439b8dc..9f5ad6b763b5 100644 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -5,7 +5,7 @@ darcVersion='' versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20' verbosity='minimal' -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" case "$opt" in --darcversion) diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index 7b9d97e3bd4d..61f302bb6775 100644 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -18,7 +18,7 @@ architecture='' runtime='dotnet' runtimeSourceFeed='' runtimeSourceFeedKey='' -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" case "$opt" in -version|-v) diff --git a/eng/common/dotnet.sh b/eng/common/dotnet.sh index 2ef68235675f..f6d24871c1d4 100644 --- a/eng/common/dotnet.sh +++ b/eng/common/dotnet.sh @@ -19,7 +19,7 @@ source $scriptroot/tools.sh InitializeDotNetCli true # install # Invoke acquired SDK with args if they are provided -if [[ $# > 0 ]]; then +if [[ $# -gt 0 ]]; then __dotnetDir=${_InitializeDotNetCli} dotnetPath=${__dotnetDir}/dotnet ${dotnetPath} "$@" diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh index 9378223ba095..6299e7effd4c 100644 --- a/eng/common/internal-feed-operations.sh +++ b/eng/common/internal-feed-operations.sh @@ -100,7 +100,7 @@ operation='' authToken='' repoName='' -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" case "$opt" in --operation) diff --git a/eng/common/native/install-dependencies.sh b/eng/common/native/install-dependencies.sh index 477a44f335be..abb47beacfa0 100644 --- a/eng/common/native/install-dependencies.sh +++ b/eng/common/native/install-dependencies.sh @@ -24,14 +24,16 @@ case "$os" in apt update apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev pigz cpio + libssl-dev libkrb5-dev pigz cpio ninja-build localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 - elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ]; then + elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ] || [ "$ID" = "centos" ]; then pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)" - $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio + $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build + elif [ "$ID" = "amzn" ]; then + dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build elif [ "$ID" = "alpine" ]; then - apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio + apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio ninja else echo "Unsupported distro. distro: $ID" exit 1 @@ -52,6 +54,7 @@ brew "openssl@3" brew "pkgconf" brew "python3" brew "pigz" +brew "ninja" EOF ;; diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1 index 472d5bb562c9..fc0218a013d1 100644 --- a/eng/common/post-build/redact-logs.ps1 +++ b/eng/common/post-build/redact-logs.ps1 @@ -9,7 +9,8 @@ param( [Parameter(Mandatory=$false)][string] $TokensFilePath, [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact, [Parameter(Mandatory=$false)][string] $runtimeSourceFeed, - [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey) + [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey +) try { $ErrorActionPreference = 'Stop' diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 977a2d4b1039..01296ee601dc 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -157,9 +157,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { return $global:_DotNetInstallDir } - # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism - $env:DOTNET_MULTILEVEL_LOOKUP=0 - # Disable first run since we do not need all ASP.NET packages restored. $env:DOTNET_NOLOGO=1 @@ -225,7 +222,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build Write-PipelinePrependPath -Path $dotnetRoot - Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1' return $global:_DotNetInstallDir = $dotnetRoot @@ -592,6 +588,11 @@ function LocateVisualStudio([object]$vsRequirements = $null){ return $null } + if ($null -eq $vsInfo -or $vsInfo.Count -eq 0) { + throw "No instance of Visual Studio meeting the requirements specified was found. Requirements: $($args -join ' ')" + return $null + } + # use first matching instance return $vsInfo[0] } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 1b296f646c23..edc7b128cf65 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -115,9 +115,6 @@ function InitializeDotNetCli { local install=$1 - # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism - export DOTNET_MULTILEVEL_LOOKUP=0 - # Disable first run since we want to control all package sources export DOTNET_NOLOGO=1 @@ -166,7 +163,6 @@ function InitializeDotNetCli { # build steps from using anything other than what we've downloaded. Write-PipelinePrependPath -path "$dotnet_root" - Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1" # return value diff --git a/global.json b/global.json index b551b337a116..22fcb8abfd4d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.300-preview.26126.103", + "version": "11.0.100-preview.3.26124.102", "paths": [ "builds/downloads/dotnet", "$host$" @@ -8,9 +8,9 @@ "errorMessage": "The .NET SDK could not be found, please run 'make dotnet -C builds'." }, "tools": { - "dotnet": "10.0.300-preview.26126.103" + "dotnet": "11.0.100-preview.3.26124.102" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26126.103" + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26124.102" } } From f34a3fd6c24602ba70ce2f9bdebf8dc5bc35ef48 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 3 Mar 2026 20:45:06 +0100 Subject: [PATCH 09/12] [sharpie] Set a few required properties for the nupkg. (#24813) --- Make.config | 2 ++ tools/sharpie/Makefile | 2 +- .../Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Make.config b/Make.config index 41676bd15aca..4602c9a36513 100644 --- a/Make.config +++ b/Make.config @@ -364,6 +364,8 @@ else $(error "The variable XCODE_IS_STABLE is not set!") endif $(Q) printf "\t\t$(TRACKING_DOTNET_RUNTIME_SEPARATELY)\n" >> $@.tmp + $(Q) printf "\t\t$(CURRENT_BRANCH)\n" >> $@.tmp + $(Q) printf "\t\t$(CURRENT_HASH_LONG)\n" >> $@.tmp $(Q) printf "\t\n" >> $@.tmp $(Q) printf "\n" >> $@.tmp $(Q) mv $@.tmp $@ diff --git a/tools/sharpie/Makefile b/tools/sharpie/Makefile index 3784d1e97dcb..99ef2c5e587d 100644 --- a/tools/sharpie/Makefile +++ b/tools/sharpie/Makefile @@ -23,7 +23,7 @@ SHARPIE_BIND_TOOL_NUPKG=Sharpie.Bind.Tool/bin/Release/$(SHARPIE_BIND_TOOL_NUPKG_ pack: $(SHARPIE_BIND_TOOL_NUPKG) $(SHARPIE_BIND_TOOL_NUPKG): $(Sharpie.Bind_dependencies) - $(Q_BUILD) $(DOTNET) pack Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj "/p:Version=$(SHARPIE_VERSION)" $(DOTNET_PACK_VERBOSITY) -bl:$@.binlog + $(Q_BUILD) $(DOTNET) pack Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj "/p:Version=$(SHARPIE_VERSION)" "/p:CurrentBranch=$(CURRENT_BRANCH)" "/p:CurrentHash=$(CURRENT_HASH_LONG)" $(DOTNET_PACK_VERBOSITY) -bl:$@.binlog all-local:: $(DOTNET_NUPKG_DIR)/$(SHARPIE_BIND_TOOL_NUPKG_NAME) $(DOTNET_NUPKG_DIR)/$(SHARPIE_BIND_TOOL_NUPKG_NAME): $(SHARPIE_BIND_TOOL_NUPKG) diff --git a/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj b/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj index 5bd06cb564ff..c58024873200 100644 --- a/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj +++ b/tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj @@ -21,8 +21,18 @@ true major + https://github.com/dotnet/macios + $(CurrentBranch) + $(CurrentHash) + + Microsoft + microsoft,dotnetframework + © Microsoft Corporation. All rights reserved. README.md LICENSE + Icon.png + https://github.com/dotnet/macios + true @@ -34,6 +44,7 @@ + From 0a86cf7a8d56f475003aaa5901d66f412c78e983 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:07:32 +0000 Subject: [PATCH 10/12] [main] Update dependencies from dotnet/macios (#24821) This pull request updates the following dependencies [marker]: <> (Begin:c0371266-dd6f-4959-822b-decc72d2d668) ## From https://github.com/dotnet/macios - **Subscription**: [c0371266-dd6f-4959-822b-decc72d2d668](https://maestro.dot.net/subscriptions?search=c0371266-dd6f-4959-822b-decc72d2d668) - **Build**: [20260302.8](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13440985) ([304125](https://maestro.dot.net/channel/3884/github:dotnet:macios/build/304125)) - **Date Produced**: March 3, 2026 2:21:46 AM UTC - **Commit**: [42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb](https://github.com/dotnet/macios/commit/42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb) - **Branch**: [release/9.0.1xx](https://github.com/dotnet/macios/tree/release/9.0.1xx) [DependencyUpdate]: <> (Begin) - **Dependency Updates**: - From [26.2.9000 to 26.2.9001][1] - Microsoft.iOS.Sdk.net9.0_26.2 - Microsoft.MacCatalyst.Sdk.net9.0_26.2 - Microsoft.macOS.Sdk.net9.0_26.2 - Microsoft.tvOS.Sdk.net9.0_26.2 [1]: https://github.com/dotnet/macios/compare/2634d0ae39...42038e186c [DependencyUpdate]: <> (End) [marker]: <> (End:c0371266-dd6f-4959-822b-decc72d2d668) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 3 +-- eng/Version.Details.props | 8 ++++---- eng/Version.Details.xml | 16 ++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index 375ee513cb1f..5f5f6bd5b5c6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -12,8 +12,7 @@ - - + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index b1222f946203..ba1306d89130 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -19,16 +19,16 @@ This file should be imported by eng/Versions.props 26.0.11017 18.5.9227 - 26.2.9000 + 26.2.9001 26.0.11017 18.5.9227 - 26.2.9000 + 26.2.9001 26.0.11017 15.5.9227 - 26.2.9000 + 26.2.9001 26.0.11017 18.5.9227 - 26.2.9000 + 26.2.9001 18.0.9617 18.0.9617 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8aec5cd07e2a..20d8f728f3c4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -60,21 +60,21 @@ 797d30720e5e629d23eb146935da94cb1b61047e - + https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b + 42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb - + https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b + 42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb - + https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b + 42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb - + https://github.com/dotnet/macios - 2634d0ae399a2992147daed0dddfd1888da2ee4b + 42038e186c8e8d9ce0f4a4ff0961bb2b061a35eb From 8c6b6010f8fc6021368a04158ddb9756ff1fd1f5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:37:21 +0000 Subject: [PATCH 11/12] [main] Update dependencies from dotnet/dotnet (#24807) This pull request updates the following dependencies ## From https://github.com/dotnet/dotnet - **Subscription**: [30303172-6f12-44a9-887a-ea8520fce068](https://maestro.dot.net/subscriptions?search=30303172-6f12-44a9-887a-ea8520fce068) - **Build**: [20260302.4](https://dev.azure.com/dnceng/internal/_build/results?buildId=2916063) ([304003](https://maestro.dot.net/channel/9626/github:dotnet:dotnet/build/304003)) - **Date Produced**: March 2, 2026 3:25:47 PM UTC - **Commit**: [938faf92928867a829fc5678ff93daf37821a3c5](https://github.com/dotnet/dotnet/commit/938faf92928867a829fc5678ff93daf37821a3c5) - **Branch**: [release/10.0.3xx](https://github.com/dotnet/dotnet/tree/release/10.0.3xx) - **Dependency Updates**: - From [10.0.0-beta.26126.103 to 10.0.0-beta.26152.104][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.SharedFramework.Sdk - From [10.0.300-preview.26126.103 to 10.0.300-preview.26152.104][1] - Microsoft.NET.Sdk - Microsoft.TemplateEngine.Authoring.Tasks [1]: https://github.com/dotnet/dotnet/compare/c9c7256d04...938faf9292 --- eng/Version.Details.props | 10 +++++----- eng/Version.Details.xml | 20 ++++++++++---------- global.json | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index ba1306d89130..d7cdbae3ff52 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,16 +6,16 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26126.103 - 10.0.0-beta.26126.103 + 10.0.0-beta.26153.116 + 10.0.0-beta.26153.116 0.11.5-alpha.26070.104 - 10.0.0-beta.26126.103 + 10.0.0-beta.26153.116 10.0.3-servicing.26070.104 10.0.3 10.0.3 - 10.0.300-preview.26126.103 + 10.0.300-preview.26153.116 10.0.3 - 10.0.300-preview.26126.103 + 10.0.300-preview.26153.116 26.0.11017 18.5.9227 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 20d8f728f3c4..12505a21d9dd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + cdfa38403fbb85d0c2f582b8dbc522c1df9a9b83 https://github.com/dotnet/dotnet @@ -95,25 +95,25 @@ - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + cdfa38403fbb85d0c2f582b8dbc522c1df9a9b83 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + cdfa38403fbb85d0c2f582b8dbc522c1df9a9b83 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + cdfa38403fbb85d0c2f582b8dbc522c1df9a9b83 https://github.com/dotnet/xharness 0eeaa60169fe6a95932d29d822e20eb225ce0143 - + https://github.com/dotnet/dotnet - c9c7256d0410d9f00ad7e4df1f56dfdf88f44418 + cdfa38403fbb85d0c2f582b8dbc522c1df9a9b83 diff --git a/global.json b/global.json index b551b337a116..fe860c6840a9 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.300-preview.26126.103", + "version": "10.0.300-preview.26153.116", "paths": [ "builds/downloads/dotnet", "$host$" @@ -8,9 +8,9 @@ "errorMessage": "The .NET SDK could not be found, please run 'make dotnet -C builds'." }, "tools": { - "dotnet": "10.0.300-preview.26126.103" + "dotnet": "10.0.300-preview.26153.116" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26126.103" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26153.116" } } From 3ab08da6f4e4c85dbd8abb8f9e69b58b4034c0ef Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Mar 2026 13:47:21 +0100 Subject: [PATCH 12/12] [devops] Treat 'merge/' branches as pull request branches. (#24823) These branches come from the inter-branch-merge workflow (.github/workflows/inter-branch-merge-flow.yml). Example: https://github.com/dotnet/macios/pull/24809. --- tools/devops/automation/build-pipeline.yml | 1 + tools/devops/automation/build-pull-request.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/devops/automation/build-pipeline.yml b/tools/devops/automation/build-pipeline.yml index 8d6144a93a56..97824c8abe3b 100644 --- a/tools/devops/automation/build-pipeline.yml +++ b/tools/devops/automation/build-pipeline.yml @@ -74,6 +74,7 @@ trigger: - refs/heads/locfiles/* - refs/heads/copilot/* - refs/heads/dependabot/* + - refs/heads/merge/* paths: exclude: diff --git a/tools/devops/automation/build-pull-request.yml b/tools/devops/automation/build-pull-request.yml index 4250b5c5f5ac..66cb04b28378 100644 --- a/tools/devops/automation/build-pull-request.yml +++ b/tools/devops/automation/build-pull-request.yml @@ -60,6 +60,7 @@ trigger: - refs/heads/locfiles/* - refs/heads/copilot/* - refs/heads/dependabot/* + - refs/heads/merge/* pr: autoCancel: true