From 25c886096a0dd8f10faf6e27f6b8c8d17a87c1e6 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Apr 2026 12:26:46 -0500 Subject: [PATCH 01/16] Add test project templates for all Apple platforms Add iostest, maccatalysttest, tvostest, and macostest project templates that create MSTest-based test projects for each Apple platform. These are modeled after jonathanpeppers/iOSDotNetTest and the equivalent androidtest template in dotnet/android. Each template includes: - MSTest runner with custom entry point (Main.cs) - ResultConsumer for test result tracking and TRX reporting - Sample Test1.cs with pass/fail/skip examples - Platform-appropriate Info.plist and Entitlements.plist - global.json for Microsoft.Testing.Platform configuration - MtouchInterpreter=all workaround for AOT compilation issues Platform-specific details: - iOS/MacCatalyst: UIApplication.Main with SceneDelegate pattern - tvOS: UIApplication.Main with AppDelegate Window pattern - macOS: NSApplication with AppKit (NSWindow/NSTextField) Also updates TemplateTest.cs to include the 4 new templates in the test matrix so they are validated by CreateAndBuildProjectTemplate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../csharp/.template.config/template.json | 41 ++++++++++ .../maccatalysttest/csharp/Entitlements.plist | 6 ++ .../maccatalysttest/csharp/Info.plist | 35 ++++++++ .../csharp/MacCatalystTest1.csproj | 37 +++++++++ .../maccatalysttest/csharp/Main.cs | 80 +++++++++++++++++++ .../maccatalysttest/csharp/ResultConsumer.cs | 55 +++++++++++++ .../maccatalysttest/csharp/Test1.cs | 21 +++++ .../maccatalysttest/csharp/global.json | 5 ++ .../csharp/.template.config/template.json | 41 ++++++++++ .../iostest/csharp/Entitlements.plist | 6 ++ .../iostest/csharp/Info.plist | 42 ++++++++++ .../iostest/csharp/Main.cs | 80 +++++++++++++++++++ .../iostest/csharp/ResultConsumer.cs | 55 +++++++++++++ .../iostest/csharp/Test1.cs | 21 +++++ .../iostest/csharp/global.json | 5 ++ .../iostest/csharp/iOSTest1.csproj | 49 ++++++++++++ .../csharp/.template.config/template.json | 41 ++++++++++ .../macostest/csharp/Entitlements.plist | 6 ++ .../macostest/csharp/Info.plist | 22 +++++ .../macostest/csharp/Main.cs | 69 ++++++++++++++++ .../macostest/csharp/ResultConsumer.cs | 55 +++++++++++++ .../macostest/csharp/Test1.cs | 21 +++++ .../macostest/csharp/global.json | 5 ++ .../macostest/csharp/macOSTest1.csproj | 29 +++++++ .../csharp/.template.config/template.json | 41 ++++++++++ .../tvostest/csharp/Entitlements.plist | 6 ++ .../tvostest/csharp/Info.plist | 22 +++++ .../tvostest/csharp/Main.cs | 65 +++++++++++++++ .../tvostest/csharp/ResultConsumer.cs | 55 +++++++++++++ .../tvostest/csharp/Test1.cs | 21 +++++ .../tvostest/csharp/global.json | 5 ++ .../tvostest/csharp/tvOSTest1.csproj | 46 +++++++++++ tests/dotnet/UnitTests/TemplateTest.cs | 4 + 33 files changed, 1092 insertions(+) create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Test1.cs create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/global.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/template.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Test1.cs create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/global.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Info.plist create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Test1.cs create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/global.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Info.plist create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Test1.cs create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/global.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json new file mode 100644 index 000000000000..893b74a6aaf6 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "macOS", "Mac Catalyst", "Test" ], + "groupIdentity": "Microsoft.MacCatalyst.MacCatalystTest", + "identity": "Microsoft.MacCatalyst.MacCatalystTest.CSharp", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "shortName": "maccatalysttest", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "MacCatalystTest1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "MacCatalystTest1.csproj" } + ], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "Overrides the ApplicationId in the project file", + "datatype": "string", + "replaces": "com.companyname.MacCatalystTest1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "15.0" + } + }, + "defaultName": "MacCatalystTest1" +} diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist new file mode 100644 index 000000000000..36a87067067f --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist new file mode 100644 index 000000000000..50eee5f2f971 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDisplayName + MacCatalystTest1 + CFBundleIdentifier + com.companyname.MacCatalystTest1 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + UIDeviceFamily + + 2 + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + + + + + + diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj new file mode 100644 index 000000000000..0b27779faecd --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -0,0 +1,37 @@ + + + net10.0-maccatalyst + MacCatalystTest1 + Exe + enable + true + true + minOSVersion + com.companyname.MacCatalystTest1 + + false + + + full + + + + + + + + + + + + + all + + + diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs new file mode 100644 index 000000000000..0cbb0c21e17f --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs @@ -0,0 +1,80 @@ +using System.Diagnostics; +using Microsoft.Testing.Extensions; +using Microsoft.Testing.Platform.Builder; +using MacCatalystTest1; + +// UIApplication.Main() provides a proper UIKit run loop, +// preventing watchdog kills during long test runs. +UIApplication.Main (args, null, typeof (AppDelegate)); + +[Register ("AppDelegate")] +class AppDelegate : UIApplicationDelegate { + public override UISceneConfiguration GetConfiguration (UIApplication application, + UISceneSession connectingSceneSession, UISceneConnectionOptions options) + { + return new UISceneConfiguration ("Default Configuration", connectingSceneSession.Role); + } +} + +[Register ("SceneDelegate")] +class SceneDelegate : UIResponder, IUIWindowSceneDelegate { + [Export ("window")] + public UIWindow? Window { get; set; } + + [Export ("scene:willConnectToSession:options:")] + public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) + { + if (scene is not UIWindowScene windowScene) + return; + + Window = new UIWindow (windowScene); + var vc = new UIViewController (); + var view = vc.View; + Debug.Assert (view != null, "UIViewController.View should not be null"); + view.BackgroundColor = UIColor.SystemBackground; + + var label = new UILabel { + Text = "Running tests...\n", + TextAlignment = UITextAlignment.Left, + Lines = 0, + Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular), + TextColor = UIColor.Label, + TranslatesAutoresizingMaskIntoConstraints = false, + }; + view.AddSubview (label); + var guide = view.SafeAreaLayoutGuide; + label.TopAnchor.ConstraintEqualTo (guide.TopAnchor, 8).Active = true; + label.LeadingAnchor.ConstraintEqualTo (guide.LeadingAnchor, 8).Active = true; + label.TrailingAnchor.ConstraintLessThanOrEqualTo (guide.TrailingAnchor, -8).Active = true; + + Window.RootViewController = vc; + Window.MakeKeyAndVisible (); + + var consumer = new ResultConsumer (); + consumer.StatusChanged += line => + vc.InvokeOnMainThread (() => label.Text += line + "\n"); + + Task.Run (async () => { + try { + var documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); + var resultsPath = Path.Combine (documentsPath, "TestResults"); + + var builder = await TestApplication.CreateBuilderAsync ([ + "--results-directory", resultsPath, + "--report-trx" + ]); + builder.AddMSTest (() => [typeof (Test1).Assembly]); + builder.AddTrxReportProvider (); + builder.TestHost.AddDataConsumer (_ => consumer); + + using ITestApplication app = await builder.BuildAsync (); + await app.RunAsync (); + // UIApplication.Main() keeps the process alive, so exit explicitly + Environment.Exit (consumer.Failed > 0 ? 1 : 0); + } catch (Exception ex) { + Console.WriteLine ($"Error running tests: {ex}"); + Environment.Exit (1); + } + }); + } +} diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs new file mode 100644 index 000000000000..bb35793a41b0 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs @@ -0,0 +1,55 @@ +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; + +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + +namespace MacCatalystTest1; + +class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } +} diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Test1.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Test1.cs new file mode 100644 index 000000000000..5df74213d439 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Test1.cs @@ -0,0 +1,21 @@ +namespace MacCatalystTest1; + +[TestClass] +public sealed class Test1 { + [TestMethod] + public void TestMethod1 () + { + } + + [TestMethod] + public void TestMethod2 () + { + Assert.Fail ("This test is expected to fail"); + } + + [TestMethod] + public void TestMethod3 () + { + Assert.Inconclusive ("This test is expected to be skipped"); + } +} diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/global.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/global.json new file mode 100644 index 000000000000..3140116df397 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/template.json new file mode 100644 index 000000000000..2380694a1a2b --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/template.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "iOS", "Mobile", "Test" ], + "groupIdentity": "Microsoft.iOS.iOSTest", + "identity": "Microsoft.iOS.iOSTest.CSharp", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "shortName": "iostest", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "iOSTest1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "iOSTest1.csproj" } + ], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "Overrides the ApplicationId in the project file", + "datatype": "string", + "replaces": "com.companyname.iOSTest1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "13.0" + } + }, + "defaultName": "iOSTest1" +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist new file mode 100644 index 000000000000..36a87067067f --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist new file mode 100644 index 000000000000..61bb6d63730a --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist @@ -0,0 +1,42 @@ + + + + + CFBundleDisplayName + iOSTest1 + CFBundleIdentifier + com.companyname.iOSTest1 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + + + + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs new file mode 100644 index 000000000000..695724309d70 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs @@ -0,0 +1,80 @@ +using System.Diagnostics; +using Microsoft.Testing.Extensions; +using Microsoft.Testing.Platform.Builder; +using iOSTest1; + +// UIApplication.Main() provides a proper UIKit run loop, +// preventing iOS watchdog kills during long test runs. +UIApplication.Main (args, null, typeof (AppDelegate)); + +[Register ("AppDelegate")] +class AppDelegate : UIApplicationDelegate { + public override UISceneConfiguration GetConfiguration (UIApplication application, + UISceneSession connectingSceneSession, UISceneConnectionOptions options) + { + return new UISceneConfiguration ("Default Configuration", connectingSceneSession.Role); + } +} + +[Register ("SceneDelegate")] +class SceneDelegate : UIResponder, IUIWindowSceneDelegate { + [Export ("window")] + public UIWindow? Window { get; set; } + + [Export ("scene:willConnectToSession:options:")] + public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) + { + if (scene is not UIWindowScene windowScene) + return; + + Window = new UIWindow (windowScene); + var vc = new UIViewController (); + var view = vc.View; + Debug.Assert (view != null, "UIViewController.View should not be null"); + view.BackgroundColor = UIColor.SystemBackground; + + var label = new UILabel { + Text = "Running tests...\n", + TextAlignment = UITextAlignment.Left, + Lines = 0, + Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular), + TextColor = UIColor.Label, + TranslatesAutoresizingMaskIntoConstraints = false, + }; + view.AddSubview (label); + var guide = view.SafeAreaLayoutGuide; + label.TopAnchor.ConstraintEqualTo (guide.TopAnchor, 8).Active = true; + label.LeadingAnchor.ConstraintEqualTo (guide.LeadingAnchor, 8).Active = true; + label.TrailingAnchor.ConstraintLessThanOrEqualTo (guide.TrailingAnchor, -8).Active = true; + + Window.RootViewController = vc; + Window.MakeKeyAndVisible (); + + var consumer = new ResultConsumer (); + consumer.StatusChanged += line => + vc.InvokeOnMainThread (() => label.Text += line + "\n"); + + Task.Run (async () => { + try { + var documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); + var resultsPath = Path.Combine (documentsPath, "TestResults"); + + var builder = await TestApplication.CreateBuilderAsync ([ + "--results-directory", resultsPath, + "--report-trx" + ]); + builder.AddMSTest (() => [typeof (Test1).Assembly]); + builder.AddTrxReportProvider (); + builder.TestHost.AddDataConsumer (_ => consumer); + + using ITestApplication app = await builder.BuildAsync (); + await app.RunAsync (); + // UIApplication.Main() keeps the process alive, so exit explicitly + Environment.Exit (consumer.Failed > 0 ? 1 : 0); + } catch (Exception ex) { + Console.WriteLine ($"Error running tests: {ex}"); + Environment.Exit (1); + } + }); + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs new file mode 100644 index 000000000000..2bfabf433fdd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs @@ -0,0 +1,55 @@ +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; + +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + +namespace iOSTest1; + +class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Test1.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Test1.cs new file mode 100644 index 000000000000..bde71968be0b --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Test1.cs @@ -0,0 +1,21 @@ +namespace iOSTest1; + +[TestClass] +public sealed class Test1 { + [TestMethod] + public void TestMethod1 () + { + } + + [TestMethod] + public void TestMethod2 () + { + Assert.Fail ("This test is expected to fail"); + } + + [TestMethod] + public void TestMethod3 () + { + Assert.Inconclusive ("This test is expected to be skipped"); + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/global.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/global.json new file mode 100644 index 000000000000..3140116df397 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj new file mode 100644 index 000000000000..9220afa50fa1 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -0,0 +1,49 @@ + + + net10.0-ios + iOSTest1 + Exe + enable + true + true + minOSVersion + com.companyname.iOSTest1 + + false + + + full + + + + + + + + + + + + + all + + + + + + + + + + + + diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json new file mode 100644 index 000000000000..8e0d73d7d538 --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "macOS", "Test" ], + "groupIdentity": "Microsoft.macOS.macOSTest", + "identity": "Microsoft.macOS.macOSTest.CSharp", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "shortName": "macostest", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "macOSTest1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "macOSTest1.csproj" } + ], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "Overrides the ApplicationId in the project file", + "datatype": "string", + "replaces": "com.companyname.macOSTest1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "12.0" + } + }, + "defaultName": "macOSTest1" +} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist new file mode 100644 index 000000000000..36a87067067f --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Info.plist b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Info.plist new file mode 100644 index 000000000000..42bd28a3c698 --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleName + macOSTest1 + CFBundleIdentifier + com.companyname.macOSTest1 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + CFBundleDevelopmentRegion + en + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + NSPrincipalClass + NSApplication + + diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs new file mode 100644 index 000000000000..9e942aef3501 --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs @@ -0,0 +1,69 @@ +using Microsoft.Testing.Extensions; +using Microsoft.Testing.Platform.Builder; +using macOSTest1; + +// NSApplication.Main() provides a proper AppKit run loop. +NSApplication.Init (); + +var app = NSApplication.SharedApplication; +app.Delegate = new AppDelegate (); +app.Run (); + +[Register ("AppDelegate")] +class AppDelegate : NSApplicationDelegate { + NSWindow? _window; + + public override void DidFinishLaunching (NSNotification notification) + { + _window = new NSWindow ( + new CoreGraphics.CGRect (0, 0, 600, 400), + NSWindowStyle.Titled | NSWindowStyle.Closable | NSWindowStyle.Resizable, + NSBackingStore.Buffered, + false + ) { + Title = "Running tests...", + }; + + var label = new NSTextField { + Editable = false, + Bordered = false, + BackgroundColor = NSColor.WindowBackground, + StringValue = "Running tests...\n", + TranslatesAutoresizingMaskIntoConstraints = false, + }; + _window.ContentView!.AddSubview (label); + label.TopAnchor.ConstraintEqualTo (_window.ContentView.TopAnchor, 8).Active = true; + label.LeadingAnchor.ConstraintEqualTo (_window.ContentView.LeadingAnchor, 8).Active = true; + label.TrailingAnchor.ConstraintEqualTo (_window.ContentView.TrailingAnchor, -8).Active = true; + + _window.Center (); + _window.MakeKeyAndOrderFront (this); + + var consumer = new ResultConsumer (); + consumer.StatusChanged += line => + NSRunLoop.Main.InvokeOnMainThread (() => label.StringValue += line + "\n"); + + Task.Run (async () => { + try { + var documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); + var resultsPath = Path.Combine (documentsPath, "TestResults"); + + var builder = await TestApplication.CreateBuilderAsync ([ + "--results-directory", resultsPath, + "--report-trx" + ]); + builder.AddMSTest (() => [typeof (Test1).Assembly]); + builder.AddTrxReportProvider (); + builder.TestHost.AddDataConsumer (_ => consumer); + + using ITestApplication testApp = await builder.BuildAsync (); + await testApp.RunAsync (); + // NSApplication.Run() keeps the process alive, so exit explicitly + Environment.Exit (consumer.Failed > 0 ? 1 : 0); + } catch (Exception ex) { + Console.WriteLine ($"Error running tests: {ex}"); + Environment.Exit (1); + } + }); + } +} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs new file mode 100644 index 000000000000..985d6f60261b --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs @@ -0,0 +1,55 @@ +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; + +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + +namespace macOSTest1; + +class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } +} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Test1.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Test1.cs new file mode 100644 index 000000000000..56ae1eaa0d9c --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Test1.cs @@ -0,0 +1,21 @@ +namespace macOSTest1; + +[TestClass] +public sealed class Test1 { + [TestMethod] + public void TestMethod1 () + { + } + + [TestMethod] + public void TestMethod2 () + { + Assert.Fail ("This test is expected to fail"); + } + + [TestMethod] + public void TestMethod3 () + { + Assert.Inconclusive ("This test is expected to be skipped"); + } +} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/global.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/global.json new file mode 100644 index 000000000000..3140116df397 --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj new file mode 100644 index 000000000000..59249d4847af --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj @@ -0,0 +1,29 @@ + + + net10.0-macos + macOSTest1 + Exe + enable + true + true + minOSVersion + com.companyname.macOSTest1 + + false + + + full + + + + + + + + + + + diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json new file mode 100644 index 000000000000..716b2373effb --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "tvOS", "Mobile", "Test" ], + "groupIdentity": "Microsoft.tvOS.tvOSTest", + "identity": "Microsoft.tvOS.tvOSTest.CSharp", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "shortName": "tvostest", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "tvOSTest1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "tvOSTest1.csproj" } + ], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "Overrides the ApplicationId in the project file", + "datatype": "string", + "replaces": "com.companyname.tvOSTest1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "12.2" + } + }, + "defaultName": "tvOSTest1" +} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist new file mode 100644 index 000000000000..36a87067067f --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Info.plist b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Info.plist new file mode 100644 index 000000000000..93d8ef644dd0 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDisplayName + tvOSTest1 + CFBundleIdentifier + com.companyname.tvOSTest1 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + UIDeviceFamily + + 3 + + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs new file mode 100644 index 000000000000..8a2cdf124049 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs @@ -0,0 +1,65 @@ +using Microsoft.Testing.Extensions; +using Microsoft.Testing.Platform.Builder; +using tvOSTest1; + +// UIApplication.Main() provides a proper UIKit run loop, +// preventing tvOS watchdog kills during long test runs. +UIApplication.Main (args, null, typeof (AppDelegate)); + +[Register ("AppDelegate")] +class AppDelegate : UIApplicationDelegate { + public override UIWindow? Window { get; set; } + + public override bool FinishedLaunching (UIApplication application, NSDictionary? launchOptions) + { + Window = new UIWindow (UIScreen.MainScreen.Bounds); + var vc = new UIViewController (); + var view = vc.View!; + view.BackgroundColor = UIColor.Black; + + var label = new UILabel { + Text = "Running tests...\n", + TextAlignment = UITextAlignment.Left, + Lines = 0, + Font = UIFont.GetMonospacedSystemFont (24, UIFontWeight.Regular), + TextColor = UIColor.White, + TranslatesAutoresizingMaskIntoConstraints = false, + }; + view.AddSubview (label); + label.TopAnchor.ConstraintEqualTo (view.SafeAreaLayoutGuide.TopAnchor, 40).Active = true; + label.LeadingAnchor.ConstraintEqualTo (view.SafeAreaLayoutGuide.LeadingAnchor, 40).Active = true; + label.TrailingAnchor.ConstraintLessThanOrEqualTo (view.SafeAreaLayoutGuide.TrailingAnchor, -40).Active = true; + + Window.RootViewController = vc; + Window.MakeKeyAndVisible (); + + var consumer = new ResultConsumer (); + consumer.StatusChanged += line => + vc.InvokeOnMainThread (() => label.Text += line + "\n"); + + Task.Run (async () => { + try { + var documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); + var resultsPath = Path.Combine (documentsPath, "TestResults"); + + var builder = await TestApplication.CreateBuilderAsync ([ + "--results-directory", resultsPath, + "--report-trx" + ]); + builder.AddMSTest (() => [typeof (Test1).Assembly]); + builder.AddTrxReportProvider (); + builder.TestHost.AddDataConsumer (_ => consumer); + + using ITestApplication app = await builder.BuildAsync (); + await app.RunAsync (); + // UIApplication.Main() keeps the process alive, so exit explicitly + Environment.Exit (consumer.Failed > 0 ? 1 : 0); + } catch (Exception ex) { + Console.WriteLine ($"Error running tests: {ex}"); + Environment.Exit (1); + } + }); + + return true; + } +} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs new file mode 100644 index 000000000000..b7b675d474b7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs @@ -0,0 +1,55 @@ +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; + +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + +namespace tvOSTest1; + +class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } +} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Test1.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Test1.cs new file mode 100644 index 000000000000..75b8f1aa5848 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Test1.cs @@ -0,0 +1,21 @@ +namespace tvOSTest1; + +[TestClass] +public sealed class Test1 { + [TestMethod] + public void TestMethod1 () + { + } + + [TestMethod] + public void TestMethod2 () + { + Assert.Fail ("This test is expected to fail"); + } + + [TestMethod] + public void TestMethod3 () + { + Assert.Inconclusive ("This test is expected to be skipped"); + } +} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/global.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/global.json new file mode 100644 index 000000000000..3140116df397 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj new file mode 100644 index 000000000000..41dda2c599c3 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -0,0 +1,46 @@ + + + net10.0-tvos + tvOSTest1 + Exe + enable + true + true + minOSVersion + com.companyname.tvOSTest1 + + false + + + full + + + + + + + + + + + + + all + + + + + + + + + + + + diff --git a/tests/dotnet/UnitTests/TemplateTest.cs b/tests/dotnet/UnitTests/TemplateTest.cs index 11da53ac3e5a..3696741ca273 100644 --- a/tests/dotnet/UnitTests/TemplateTest.cs +++ b/tests/dotnet/UnitTests/TemplateTest.cs @@ -104,24 +104,28 @@ public enum TemplateType { new TemplateInfo (ApplePlatform.iOS, "iosbinding", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.iOS, "ios-notification-content-extension", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.iOS, "ios-notification-service-extension", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.iOS, "iostest", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.TVOS, "tvos", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.TVOS, "tvos", TemplateLanguage.VisualBasic), new TemplateInfo (ApplePlatform.TVOS, "tvoslib", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.TVOS, "tvoslib", TemplateLanguage.VisualBasic), new TemplateInfo (ApplePlatform.TVOS, "tvosbinding", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.TVOS, "tvostest", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalyst", TemplateLanguage.CSharp, execute: true), new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalyst", TemplateLanguage.VisualBasic, execute: true), new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalystlib", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalystlib", TemplateLanguage.VisualBasic), new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalystbinding", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.MacCatalyst, "maccatalysttest", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.MacOSX, "macos", TemplateLanguage.CSharp, execute: true), new TemplateInfo (ApplePlatform.MacOSX, "macos", TemplateLanguage.VisualBasic, execute: true), new TemplateInfo (ApplePlatform.MacOSX, "macoslib", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.MacOSX, "macoslib", TemplateLanguage.VisualBasic), new TemplateInfo (ApplePlatform.MacOSX, "macosbinding", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.MacOSX, "macostest", TemplateLanguage.CSharp), /* item templates */ new TemplateInfo (ApplePlatform.iOS, "ios-controller"), From 4f56ac6fd0e1fd06d99d3c812112711453a2401a Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Mon, 20 Apr 2026 20:19:58 +0000 Subject: [PATCH 02/16] Auto-format source code --- .../maccatalysttest/csharp/Main.cs | 2 +- .../maccatalysttest/csharp/ResultConsumer.cs | 2 +- dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs | 2 +- .../Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs | 2 +- .../macostest/csharp/ResultConsumer.cs | 2 +- .../Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs index 0cbb0c21e17f..72a8af97247c 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs @@ -30,7 +30,7 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio Window = new UIWindow (windowScene); var vc = new UIViewController (); var view = vc.View; - Debug.Assert (view != null, "UIViewController.View should not be null"); + Debug.Assert (view is not null, "UIViewController.View should not be null"); view.BackgroundColor = UIColor.SystemBackground; var label = new UILabel { diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs index bb35793a41b0..f560ad5883cb 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs @@ -19,7 +19,7 @@ class ResultConsumer : IDataConsumer { public string Version => "1.0"; public Task IsEnabledAsync () => Task.FromResult (true); - public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) { diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs index 695724309d70..df8a2599b6ee 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs @@ -30,7 +30,7 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio Window = new UIWindow (windowScene); var vc = new UIViewController (); var view = vc.View; - Debug.Assert (view != null, "UIViewController.View should not be null"); + Debug.Assert (view is not null, "UIViewController.View should not be null"); view.BackgroundColor = UIColor.SystemBackground; var label = new UILabel { diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs index 2bfabf433fdd..158e264b909b 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs @@ -19,7 +19,7 @@ class ResultConsumer : IDataConsumer { public string Version => "1.0"; public Task IsEnabledAsync () => Task.FromResult (true); - public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) { diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs index 985d6f60261b..af3037a3cbe4 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs @@ -19,7 +19,7 @@ class ResultConsumer : IDataConsumer { public string Version => "1.0"; public Task IsEnabledAsync () => Task.FromResult (true); - public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) { diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs index b7b675d474b7..07a2c2583b5c 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs @@ -19,7 +19,7 @@ class ResultConsumer : IDataConsumer { public string Version => "1.0"; public Task IsEnabledAsync () => Task.FromResult (true); - public Type[] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) { From cac67afc537d23001204117ecdc8e07d24fe99dc Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Apr 2026 16:24:28 -0500 Subject: [PATCH 03/16] Set MtouchInterpreter=all globally when EnableMSTestRunner=true Move the MtouchInterpreter workaround from individual test templates into Xamarin.Shared.props so any MSTest runner project automatically gets the interpreter enabled, not just our templates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../csharp/MacCatalystTest1.csproj | 8 -------- .../iostest/csharp/iOSTest1.csproj | 20 ------------------- .../tvostest/csharp/tvOSTest1.csproj | 17 ---------------- msbuild/Xamarin.Shared/Xamarin.Shared.props | 3 +++ 4 files changed, 3 insertions(+), 45 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj index 0b27779faecd..3eaf9a884a5c 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -26,12 +26,4 @@ - - - all - - diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj index 9220afa50fa1..8ac1f4a71634 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -26,24 +26,4 @@ - - - all - - - - - - - - - - - diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj index 41dda2c599c3..80df3da2be59 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -26,21 +26,4 @@ - - - all - - - - - - - - - - - diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.props b/msbuild/Xamarin.Shared/Xamarin.Shared.props index 4b2c9b8173b7..52cf09793652 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.props +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.props @@ -211,6 +211,9 @@ Copyright (C) 2020 Microsoft. All rights reserved. all + + all + <_AppBundleName Condition="'$(_AppBundleName)' == '' And $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 10.0)) And ('$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst')">$(ApplicationTitle) <_AppBundleName Condition="'$(_AppBundleName)' == ''">$(AssemblyName) From c8156d74510beafce218921d4005e1b40aa1db7d Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Apr 2026 16:55:02 -0500 Subject: [PATCH 04/16] Remove TrimMode from test templates Test framework assemblies have trimmer warnings, so full trimming should not be enabled by default in test project templates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/MacCatalystTest1.csproj | 6 ------ .../Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj | 6 ------ .../macostest/csharp/macOSTest1.csproj | 6 ------ .../tvostest/csharp/tvOSTest1.csproj | 6 ------ 4 files changed, 24 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj index 3eaf9a884a5c..22d712559eae 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -10,12 +10,6 @@ com.companyname.MacCatalystTest1 false - - - full diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj index 8ac1f4a71634..89dc312a0421 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -10,12 +10,6 @@ com.companyname.iOSTest1 false - - - full diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj index 59249d4847af..4b87e3c6fd49 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj @@ -10,12 +10,6 @@ com.companyname.macOSTest1 false - - - full diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj index 80df3da2be59..38a4be65df4a 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -10,12 +10,6 @@ com.companyname.tvOSTest1 false - - - full From f7ec8e4e50a169b7935adf72ac5f3dbfcaf92522 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Apr 2026 17:12:08 -0500 Subject: [PATCH 05/16] Fix test templates to target net11.0 The net11.0 branch templates should use net11.0 TFMs, not net10.0. This also ensures the MtouchInterpreter=all shared props change is picked up from the correct SDK pack. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/MacCatalystTest1.csproj | 2 +- .../Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj | 2 +- .../macostest/csharp/macOSTest1.csproj | 2 +- .../tvostest/csharp/tvOSTest1.csproj | 2 +- dotnet/targets/Xamarin.Shared.Sdk.Trimming.props | 6 ++++++ msbuild/Xamarin.Shared/Xamarin.Shared.props | 3 --- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj index 22d712559eae..aeb0aa974225 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -1,6 +1,6 @@ - net10.0-maccatalyst + net11.0-maccatalyst MacCatalystTest1 Exe enable diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj index 89dc312a0421..b7bcf53c5a08 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -1,6 +1,6 @@ - net10.0-ios + net11.0-ios iOSTest1 Exe enable diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj index 4b87e3c6fd49..fccd3744f6d1 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj @@ -1,6 +1,6 @@ - net10.0-macos + net11.0-macos macOSTest1 Exe enable diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj index 38a4be65df4a..3379afa333f9 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -1,6 +1,6 @@ - net10.0-tvos + net11.0-tvos tvOSTest1 Exe enable diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props index f2734028ef04..b699fcd1a971 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props @@ -46,6 +46,12 @@ <_DefaultLinkMode>TrimMode + + + all + + false + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_UseNativeAot)' == 'true'">Full diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.props b/msbuild/Xamarin.Shared/Xamarin.Shared.props index 52cf09793652..4b2c9b8173b7 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.props +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.props @@ -211,9 +211,6 @@ Copyright (C) 2020 Microsoft. All rights reserved. all - - all - <_AppBundleName Condition="'$(_AppBundleName)' == '' And $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 10.0)) And ('$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst')">$(ApplicationTitle) <_AppBundleName Condition="'$(_AppBundleName)' == ''">$(AssemblyName) From 6c28c5d350d06377dfd277d8dc11315f74d8c635 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 21 Apr 2026 10:13:33 -0500 Subject: [PATCH 06/16] Move MSTest workarounds to shared targets, remove obsolete API - Remove CancelledTestNodeStateProperty (obsolete CS0618) from all templates - Move GenerateTestingPlatformEntryPoint=false to Xamarin.Shared.Sdk.Trimming.props - Consolidate EnableMSTestRunner condition on PropertyGroup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/MacCatalystTest1.csproj | 2 -- .../maccatalysttest/csharp/ResultConsumer.cs | 2 +- .../iostest/csharp/ResultConsumer.cs | 2 +- .../iostest/csharp/iOSTest1.csproj | 2 -- .../macostest/csharp/ResultConsumer.cs | 2 +- .../macostest/csharp/macOSTest1.csproj | 2 -- .../tvostest/csharp/ResultConsumer.cs | 2 +- .../tvostest/csharp/tvOSTest1.csproj | 2 -- dotnet/targets/Xamarin.Shared.Sdk.Trimming.props | 8 +++++--- 9 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj index aeb0aa974225..f247f47eaecd 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -8,8 +8,6 @@ true minOSVersion com.companyname.MacCatalystTest1 - - false diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs index f560ad5883cb..8768d48a29fe 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs @@ -34,7 +34,7 @@ public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationT string? outcome = state switch { PassedTestNodeStateProperty => "passed", FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + or TimeoutTestNodeStateProperty => "failed", SkippedTestNodeStateProperty => "skipped", _ => null }; diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs index 158e264b909b..6d7fbe640221 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs @@ -34,7 +34,7 @@ public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationT string? outcome = state switch { PassedTestNodeStateProperty => "passed", FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + or TimeoutTestNodeStateProperty => "failed", SkippedTestNodeStateProperty => "skipped", _ => null }; diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj index b7bcf53c5a08..beece3e094f0 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -8,8 +8,6 @@ true minOSVersion com.companyname.iOSTest1 - - false diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs index af3037a3cbe4..9e2a7cdbd446 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs @@ -34,7 +34,7 @@ public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationT string? outcome = state switch { PassedTestNodeStateProperty => "passed", FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + or TimeoutTestNodeStateProperty => "failed", SkippedTestNodeStateProperty => "skipped", _ => null }; diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj index fccd3744f6d1..7a64825d9fe3 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj @@ -8,8 +8,6 @@ true minOSVersion com.companyname.macOSTest1 - - false diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs index 07a2c2583b5c..7cf691a8b322 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs @@ -34,7 +34,7 @@ public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationT string? outcome = state switch { PassedTestNodeStateProperty => "passed", FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty or CancelledTestNodeStateProperty => "failed", + or TimeoutTestNodeStateProperty => "failed", SkippedTestNodeStateProperty => "skipped", _ => null }; diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj index 3379afa333f9..a0aa684865a5 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -8,8 +8,6 @@ true minOSVersion com.companyname.tvOSTest1 - - false diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props index b699fcd1a971..57d3fafbd297 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props @@ -46,11 +46,13 @@ <_DefaultLinkMode>TrimMode - + - all + all - false + false + + false From d21d13c9e96a30bbcbb243c5a34780d11b97b74a Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 21 Apr 2026 10:37:04 -0500 Subject: [PATCH 07/16] Fix Info.plist orientation warnings and CS8601 nullable warning - Add UISupportedInterfaceOrientations to iOS and Mac Catalyst test templates - Fix nullable warning on UIFont.GetMonospacedSystemFont Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/Info.plist | 6 ++++++ .../maccatalysttest/csharp/Main.cs | 2 +- .../iostest/csharp/Info.plist | 13 +++++++++++++ .../Microsoft.iOS.Templates/iostest/csharp/Main.cs | 2 +- .../tvostest/csharp/Main.cs | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist index 50eee5f2f971..8fb7ffdcfd20 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Info.plist @@ -14,6 +14,12 @@ 2 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs index 72a8af97247c..a000f3da4df6 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs @@ -37,7 +37,7 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio Text = "Running tests...\n", TextAlignment = UITextAlignment.Left, Lines = 0, - Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular), + Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular)!, TextColor = UIColor.Label, TranslatesAutoresizingMaskIntoConstraints = false, }; diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist index 61bb6d63730a..17c9ab1147d6 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Info.plist @@ -21,6 +21,19 @@ armv7 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs index df8a2599b6ee..1bbff15a9600 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs @@ -37,7 +37,7 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio Text = "Running tests...\n", TextAlignment = UITextAlignment.Left, Lines = 0, - Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular), + Font = UIFont.GetMonospacedSystemFont (12, UIFontWeight.Regular)!, TextColor = UIColor.Label, TranslatesAutoresizingMaskIntoConstraints = false, }; diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs index 8a2cdf124049..e9d66a1265ba 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs @@ -21,7 +21,7 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary? Text = "Running tests...\n", TextAlignment = UITextAlignment.Left, Lines = 0, - Font = UIFont.GetMonospacedSystemFont (24, UIFontWeight.Regular), + Font = UIFont.GetMonospacedSystemFont (24, UIFontWeight.Regular)!, TextColor = UIColor.White, TranslatesAutoresizingMaskIntoConstraints = false, }; From 71682b360ef28e15a7a05bf176fe9dccad07fc25 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 21 Apr 2026 12:47:20 -0500 Subject: [PATCH 08/16] Set NO_COLOR=1 for MSTest runner projects to fix garbled output MSTest's terminal UI emits ANSI escape codes that appear as garbled text when captured through simulator/device logs. Setting NO_COLOR=1 as a RuntimeEnvironmentVariable disables this. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Xamarin.Shared.Sdk.Trimming.props | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props index 57d3fafbd297..b5ff90cf2ecb 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props @@ -54,6 +54,10 @@ false + + + + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_UseNativeAot)' == 'true'">Full From 68b9e8b680e1dbcb923e591130938718eeddb35a Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 23 Apr 2026 12:42:59 -0500 Subject: [PATCH 09/16] Move MSTest properties to Xamarin.Shared.Sdk.MSTest.props Extract MSTest runner defaults into a dedicated file, imported conditionally when EnableMSTestRunner=true, keeping Trimming.props focused on trimming/linking logic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/Makefile | 1 + dotnet/targets/Xamarin.Shared.Sdk.MSTest.props | 18 ++++++++++++++++++ .../targets/Xamarin.Shared.Sdk.Trimming.props | 13 +------------ 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 dotnet/targets/Xamarin.Shared.Sdk.MSTest.props diff --git a/dotnet/Makefile b/dotnet/Makefile index bd150b2f5e6c..07ed5db2217f 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -42,6 +42,7 @@ $(1)_NUGET_TARGETS = \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.props \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Xamarin.Shared.Sdk.props \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Xamarin.Shared.Sdk.Trimming.props \ + $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Xamarin.Shared.Sdk.MSTest.props \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Xamarin.Shared.Sdk.targets \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/dotnet-xcsync.targets \ $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/targets/Microsoft.MaciOS.Sdk.Xcode.targets \ diff --git a/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props b/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props new file mode 100644 index 000000000000..41141460aa0c --- /dev/null +++ b/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props @@ -0,0 +1,18 @@ + + + + + + + all + + false + + false + + + + + + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props index b5ff90cf2ecb..77e7138d9b51 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Trimming.props @@ -46,18 +46,7 @@ <_DefaultLinkMode>TrimMode - - - all - - false - - false - - - - - + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_UseNativeAot)' == 'true'">Full From ef0580e8c0c3bada9422a79ae56005b2d915bd23 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 23 Apr 2026 12:44:59 -0500 Subject: [PATCH 10/16] Remove unnecessary Entitlements.plist from test templates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/Entitlements.plist | 6 ------ .../iostest/csharp/Entitlements.plist | 6 ------ .../macostest/csharp/Entitlements.plist | 6 ------ .../tvostest/csharp/Entitlements.plist | 6 ------ 4 files changed, 24 deletions(-) delete mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist delete mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist delete mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist delete mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist deleted file mode 100644 index 36a87067067f..000000000000 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Entitlements.plist +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist deleted file mode 100644 index 36a87067067f..000000000000 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Entitlements.plist +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist deleted file mode 100644 index 36a87067067f..000000000000 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Entitlements.plist +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist deleted file mode 100644 index 36a87067067f..000000000000 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Entitlements.plist +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - From b2e69a4630f939bc7bc458e85a8cffb6d336fdee Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 23 Apr 2026 12:45:25 -0500 Subject: [PATCH 11/16] Update MSTest to 4.2.1 in test templates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/MacCatalystTest1.csproj | 2 +- .../Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj | 2 +- .../macostest/csharp/macOSTest1.csproj | 2 +- .../Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj index f247f47eaecd..7eefeea6d40d 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/MacCatalystTest1.csproj @@ -11,7 +11,7 @@ - + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj index beece3e094f0..54fe10a19972 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/iOSTest1.csproj @@ -11,7 +11,7 @@ - + diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj index 7a64825d9fe3..5e4e86c60c20 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/macOSTest1.csproj @@ -11,7 +11,7 @@ - + diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj index a0aa684865a5..709aa6e78942 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/tvOSTest1.csproj @@ -11,7 +11,7 @@ - + From c93208d3605bbc09157e39b8342517d72093145f Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 23 Apr 2026 12:52:51 -0500 Subject: [PATCH 12/16] Inline ResultConsumer as nested class in Main.cs Move ResultConsumer into the containing class (SceneDelegate or AppDelegate) in each template, matching how Android's template structures TestInstrumentation.cs. This eliminates the separate ResultConsumer.cs file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/Main.cs | 53 ++++++++++++++++++ .../maccatalysttest/csharp/ResultConsumer.cs | 55 ------------------- .../iostest/csharp/Main.cs | 53 ++++++++++++++++++ .../iostest/csharp/ResultConsumer.cs | 55 ------------------- .../macostest/csharp/Main.cs | 53 ++++++++++++++++++ .../macostest/csharp/ResultConsumer.cs | 55 ------------------- .../tvostest/csharp/Main.cs | 53 ++++++++++++++++++ .../tvostest/csharp/ResultConsumer.cs | 55 ------------------- 8 files changed, 212 insertions(+), 220 deletions(-) delete mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs delete mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs delete mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs delete mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs index a000f3da4df6..c66e487fc13f 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/Main.cs @@ -1,8 +1,12 @@ using System.Diagnostics; using Microsoft.Testing.Extensions; using Microsoft.Testing.Platform.Builder; +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; using MacCatalystTest1; +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + // UIApplication.Main() provides a proper UIKit run loop, // preventing watchdog kills during long test runs. UIApplication.Main (args, null, typeof (AppDelegate)); @@ -77,4 +81,53 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio } }); } + + class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } + } } diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs deleted file mode 100644 index 8768d48a29fe..000000000000 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/ResultConsumer.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Testing.Platform.Extensions; -using Microsoft.Testing.Platform.Extensions.Messages; - -[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] - -namespace MacCatalystTest1; - -class ResultConsumer : IDataConsumer { - int _passed, _failed, _skipped; - public int Passed => _passed; - public int Failed => _failed; - public int Skipped => _skipped; - public string? TrxReportPath; - public event Action? StatusChanged; - - public string Uid => nameof (ResultConsumer); - public string DisplayName => nameof (ResultConsumer); - public string Description => ""; - public string Version => "1.0"; - public Task IsEnabledAsync () => Task.FromResult (true); - - public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; - - public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) - { - if (value is SessionFileArtifact artifact) { - TrxReportPath = artifact.FileInfo.FullName; - - Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); - Console.WriteLine ($"TRX report: {TrxReportPath}"); - StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); - } else if (value is TestNodeUpdateMessage { TestNode: var node }) { - var state = node.Properties.SingleOrDefault (); - string? outcome = state switch { - PassedTestNodeStateProperty => "passed", - FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty => "failed", - SkippedTestNodeStateProperty => "skipped", - _ => null - }; - if (outcome is null) - return Task.CompletedTask; - - _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; - - var id = node.Properties.SingleOrDefault (); - var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; - Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); - - var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; - StatusChanged?.Invoke ($"{icon} {testName}"); - } - return Task.CompletedTask; - } -} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs index 1bbff15a9600..5210f24cfcc0 100644 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/Main.cs @@ -1,8 +1,12 @@ using System.Diagnostics; using Microsoft.Testing.Extensions; using Microsoft.Testing.Platform.Builder; +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; using iOSTest1; +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + // UIApplication.Main() provides a proper UIKit run loop, // preventing iOS watchdog kills during long test runs. UIApplication.Main (args, null, typeof (AppDelegate)); @@ -77,4 +81,53 @@ public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectio } }); } + + class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } + } } diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs deleted file mode 100644 index 6d7fbe640221..000000000000 --- a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/ResultConsumer.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Testing.Platform.Extensions; -using Microsoft.Testing.Platform.Extensions.Messages; - -[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] - -namespace iOSTest1; - -class ResultConsumer : IDataConsumer { - int _passed, _failed, _skipped; - public int Passed => _passed; - public int Failed => _failed; - public int Skipped => _skipped; - public string? TrxReportPath; - public event Action? StatusChanged; - - public string Uid => nameof (ResultConsumer); - public string DisplayName => nameof (ResultConsumer); - public string Description => ""; - public string Version => "1.0"; - public Task IsEnabledAsync () => Task.FromResult (true); - - public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; - - public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) - { - if (value is SessionFileArtifact artifact) { - TrxReportPath = artifact.FileInfo.FullName; - - Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); - Console.WriteLine ($"TRX report: {TrxReportPath}"); - StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); - } else if (value is TestNodeUpdateMessage { TestNode: var node }) { - var state = node.Properties.SingleOrDefault (); - string? outcome = state switch { - PassedTestNodeStateProperty => "passed", - FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty => "failed", - SkippedTestNodeStateProperty => "skipped", - _ => null - }; - if (outcome is null) - return Task.CompletedTask; - - _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; - - var id = node.Properties.SingleOrDefault (); - var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; - Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); - - var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; - StatusChanged?.Invoke ($"{icon} {testName}"); - } - return Task.CompletedTask; - } -} diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs index 9e942aef3501..3c3c16808d33 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/Main.cs @@ -1,7 +1,11 @@ using Microsoft.Testing.Extensions; using Microsoft.Testing.Platform.Builder; +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; using macOSTest1; +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + // NSApplication.Main() provides a proper AppKit run loop. NSApplication.Init (); @@ -66,4 +70,53 @@ public override void DidFinishLaunching (NSNotification notification) } }); } + + class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } + } } diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs deleted file mode 100644 index 9e2a7cdbd446..000000000000 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/ResultConsumer.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Testing.Platform.Extensions; -using Microsoft.Testing.Platform.Extensions.Messages; - -[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] - -namespace macOSTest1; - -class ResultConsumer : IDataConsumer { - int _passed, _failed, _skipped; - public int Passed => _passed; - public int Failed => _failed; - public int Skipped => _skipped; - public string? TrxReportPath; - public event Action? StatusChanged; - - public string Uid => nameof (ResultConsumer); - public string DisplayName => nameof (ResultConsumer); - public string Description => ""; - public string Version => "1.0"; - public Task IsEnabledAsync () => Task.FromResult (true); - - public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; - - public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) - { - if (value is SessionFileArtifact artifact) { - TrxReportPath = artifact.FileInfo.FullName; - - Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); - Console.WriteLine ($"TRX report: {TrxReportPath}"); - StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); - } else if (value is TestNodeUpdateMessage { TestNode: var node }) { - var state = node.Properties.SingleOrDefault (); - string? outcome = state switch { - PassedTestNodeStateProperty => "passed", - FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty => "failed", - SkippedTestNodeStateProperty => "skipped", - _ => null - }; - if (outcome is null) - return Task.CompletedTask; - - _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; - - var id = node.Properties.SingleOrDefault (); - var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; - Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); - - var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; - StatusChanged?.Invoke ($"{icon} {testName}"); - } - return Task.CompletedTask; - } -} diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs index e9d66a1265ba..d7af5d2da021 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs @@ -1,7 +1,11 @@ using Microsoft.Testing.Extensions; using Microsoft.Testing.Platform.Builder; +using Microsoft.Testing.Platform.Extensions; +using Microsoft.Testing.Platform.Extensions.Messages; using tvOSTest1; +[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] + // UIApplication.Main() provides a proper UIKit run loop, // preventing tvOS watchdog kills during long test runs. UIApplication.Main (args, null, typeof (AppDelegate)); @@ -62,4 +66,53 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary? return true; } + + class ResultConsumer : IDataConsumer { + int _passed, _failed, _skipped; + public int Passed => _passed; + public int Failed => _failed; + public int Skipped => _skipped; + public string? TrxReportPath; + public event Action? StatusChanged; + + public string Uid => nameof (ResultConsumer); + public string DisplayName => nameof (ResultConsumer); + public string Description => ""; + public string Version => "1.0"; + public Task IsEnabledAsync () => Task.FromResult (true); + + public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; + + public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) + { + if (value is SessionFileArtifact artifact) { + TrxReportPath = artifact.FileInfo.FullName; + + Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); + Console.WriteLine ($"TRX report: {TrxReportPath}"); + StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); + } else if (value is TestNodeUpdateMessage { TestNode: var node }) { + var state = node.Properties.SingleOrDefault (); + string? outcome = state switch { + PassedTestNodeStateProperty => "passed", + FailedTestNodeStateProperty or ErrorTestNodeStateProperty + or TimeoutTestNodeStateProperty => "failed", + SkippedTestNodeStateProperty => "skipped", + _ => null + }; + if (outcome is null) + return Task.CompletedTask; + + _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; + + var id = node.Properties.SingleOrDefault (); + var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; + Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); + + var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; + StatusChanged?.Invoke ($"{icon} {testName}"); + } + return Task.CompletedTask; + } + } } diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs deleted file mode 100644 index 7cf691a8b322..000000000000 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/ResultConsumer.cs +++ /dev/null @@ -1,55 +0,0 @@ -using Microsoft.Testing.Platform.Extensions; -using Microsoft.Testing.Platform.Extensions.Messages; - -[assembly: Parallelize (Scope = ExecutionScope.MethodLevel)] - -namespace tvOSTest1; - -class ResultConsumer : IDataConsumer { - int _passed, _failed, _skipped; - public int Passed => _passed; - public int Failed => _failed; - public int Skipped => _skipped; - public string? TrxReportPath; - public event Action? StatusChanged; - - public string Uid => nameof (ResultConsumer); - public string DisplayName => nameof (ResultConsumer); - public string Description => ""; - public string Version => "1.0"; - public Task IsEnabledAsync () => Task.FromResult (true); - - public Type [] DataTypesConsumed => [typeof (TestNodeUpdateMessage), typeof (SessionFileArtifact)]; - - public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationToken cancellationToken) - { - if (value is SessionFileArtifact artifact) { - TrxReportPath = artifact.FileInfo.FullName; - - Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); - Console.WriteLine ($"TRX report: {TrxReportPath}"); - StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); - } else if (value is TestNodeUpdateMessage { TestNode: var node }) { - var state = node.Properties.SingleOrDefault (); - string? outcome = state switch { - PassedTestNodeStateProperty => "passed", - FailedTestNodeStateProperty or ErrorTestNodeStateProperty - or TimeoutTestNodeStateProperty => "failed", - SkippedTestNodeStateProperty => "skipped", - _ => null - }; - if (outcome is null) - return Task.CompletedTask; - - _ = outcome switch { "passed" => Interlocked.Increment (ref _passed), "failed" => Interlocked.Increment (ref _failed), _ => Interlocked.Increment (ref _skipped) }; - - var id = node.Properties.SingleOrDefault (); - var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; - Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); - - var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; - StatusChanged?.Invoke ($"{icon} {testName}"); - } - return Task.CompletedTask; - } -} From d01009176833d685dad56127254261228e34e99f Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 23 Apr 2026 16:50:52 -0500 Subject: [PATCH 13/16] Fix minOSVersion defaults in test templates to match app templates tvOS: 12.2 -> 13.0 macOS: 12.0 -> 14.0 Mac Catalyst: 15.0 -> 17.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../maccatalysttest/csharp/.template.config/template.json | 2 +- .../macostest/csharp/.template.config/template.json | 2 +- .../tvostest/csharp/.template.config/template.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json index 893b74a6aaf6..f5cd12a1c1d8 100644 --- a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/template.json @@ -34,7 +34,7 @@ "description": "Overrides SupportedOSPlatformVersion in the project file", "replaces": "minOSVersion", "datatype": "string", - "defaultValue": "15.0" + "defaultValue": "17.0" } }, "defaultName": "MacCatalystTest1" diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json index 8e0d73d7d538..2b27f0581997 100644 --- a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/template.json @@ -34,7 +34,7 @@ "description": "Overrides SupportedOSPlatformVersion in the project file", "replaces": "minOSVersion", "datatype": "string", - "defaultValue": "12.0" + "defaultValue": "14.0" } }, "defaultName": "macOSTest1" diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json index 716b2373effb..cc49221741c7 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/template.json @@ -34,7 +34,7 @@ "description": "Overrides SupportedOSPlatformVersion in the project file", "replaces": "minOSVersion", "datatype": "string", - "defaultValue": "12.2" + "defaultValue": "13.0" } }, "defaultName": "tvOSTest1" From 6990b322202b864069e111e437bd4a5265640a90 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 24 Apr 2026 09:40:16 +0200 Subject: [PATCH 14/16] Add localization files. --- .../.template.config/localize/templatestrings.cs.json | 7 +++++++ .../.template.config/localize/templatestrings.de.json | 7 +++++++ .../.template.config/localize/templatestrings.en.json | 7 +++++++ .../.template.config/localize/templatestrings.es.json | 7 +++++++ .../.template.config/localize/templatestrings.fr.json | 7 +++++++ .../.template.config/localize/templatestrings.it.json | 7 +++++++ .../.template.config/localize/templatestrings.ja.json | 7 +++++++ .../.template.config/localize/templatestrings.ko.json | 7 +++++++ .../.template.config/localize/templatestrings.pl.json | 7 +++++++ .../.template.config/localize/templatestrings.pt-BR.json | 7 +++++++ .../.template.config/localize/templatestrings.ru.json | 7 +++++++ .../.template.config/localize/templatestrings.tr.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hans.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hant.json | 7 +++++++ .../.template.config/localize/templatestrings.cs.json | 7 +++++++ .../.template.config/localize/templatestrings.de.json | 7 +++++++ .../.template.config/localize/templatestrings.en.json | 7 +++++++ .../.template.config/localize/templatestrings.es.json | 7 +++++++ .../.template.config/localize/templatestrings.fr.json | 7 +++++++ .../.template.config/localize/templatestrings.it.json | 7 +++++++ .../.template.config/localize/templatestrings.ja.json | 7 +++++++ .../.template.config/localize/templatestrings.ko.json | 7 +++++++ .../.template.config/localize/templatestrings.pl.json | 7 +++++++ .../.template.config/localize/templatestrings.pt-BR.json | 7 +++++++ .../.template.config/localize/templatestrings.ru.json | 7 +++++++ .../.template.config/localize/templatestrings.tr.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hans.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hant.json | 7 +++++++ .../.template.config/localize/templatestrings.cs.json | 7 +++++++ .../.template.config/localize/templatestrings.de.json | 7 +++++++ .../.template.config/localize/templatestrings.en.json | 7 +++++++ .../.template.config/localize/templatestrings.es.json | 7 +++++++ .../.template.config/localize/templatestrings.fr.json | 7 +++++++ .../.template.config/localize/templatestrings.it.json | 7 +++++++ .../.template.config/localize/templatestrings.ja.json | 7 +++++++ .../.template.config/localize/templatestrings.ko.json | 7 +++++++ .../.template.config/localize/templatestrings.pl.json | 7 +++++++ .../.template.config/localize/templatestrings.pt-BR.json | 7 +++++++ .../.template.config/localize/templatestrings.ru.json | 7 +++++++ .../.template.config/localize/templatestrings.tr.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hans.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hant.json | 7 +++++++ .../.template.config/localize/templatestrings.cs.json | 7 +++++++ .../.template.config/localize/templatestrings.de.json | 7 +++++++ .../.template.config/localize/templatestrings.en.json | 7 +++++++ .../.template.config/localize/templatestrings.es.json | 7 +++++++ .../.template.config/localize/templatestrings.fr.json | 7 +++++++ .../.template.config/localize/templatestrings.it.json | 7 +++++++ .../.template.config/localize/templatestrings.ja.json | 7 +++++++ .../.template.config/localize/templatestrings.ko.json | 7 +++++++ .../.template.config/localize/templatestrings.pl.json | 7 +++++++ .../.template.config/localize/templatestrings.pt-BR.json | 7 +++++++ .../.template.config/localize/templatestrings.ru.json | 7 +++++++ .../.template.config/localize/templatestrings.tr.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hans.json | 7 +++++++ .../.template.config/localize/templatestrings.zh-Hant.json | 7 +++++++ 56 files changed, 392 insertions(+) create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.cs.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.de.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.en.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.es.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.fr.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.it.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ja.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ko.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pl.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pt-BR.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ru.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.tr.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hans.json create mode 100644 dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hant.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.cs.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.de.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.en.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.es.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.fr.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.it.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ja.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ko.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pl.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pt-BR.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ru.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.tr.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hans.json create mode 100644 dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hant.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.cs.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.de.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.en.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.es.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.fr.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.it.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ja.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ko.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pl.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pt-BR.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ru.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.tr.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hans.json create mode 100644 dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hant.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.cs.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.de.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.en.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.es.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.fr.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.it.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ja.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ko.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pl.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pt-BR.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ru.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.tr.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hans.json create mode 100644 dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hant.json diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..8d1d96d1fe79 --- /dev/null +++ b/dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalysttest/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "Mac Catalyst Test Project", + "description": "A project for creating a .NET Mac Catalyst test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..46c2d08fe27e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/iostest/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "iOS Test Project", + "description": "A project for creating a .NET iOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..2ecc02b6552e --- /dev/null +++ b/dotnet/Templates/Microsoft.macOS.Templates/macostest/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "macOS Test Project", + "description": "A project for creating a .NET macOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..7f4b9444b6d7 --- /dev/null +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,7 @@ +{ + "author": "Microsoft", + "name": "tvOS Test Project", + "description": "A project for creating a .NET tvOS test project using MSTest", + "symbols/bundleId/description": "Overrides the ApplicationId in the project file", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file From 1481a3dfa8e2db42f38516f378ca7ab6f026c99e Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 24 Apr 2026 11:22:18 -0500 Subject: [PATCH 15/16] Suppress trim analysis warnings for MSTest projects MSTest's transitive dependency on Microsoft.ApplicationInsights produces trimmer warnings on Mac Catalyst where linking defaults to SdkOnly. These warnings are not actionable for test projects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Xamarin.Shared.Sdk.MSTest.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props b/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props index 41141460aa0c..83ced6200365 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.MSTest.props @@ -9,6 +9,8 @@ false false + + true From a3dc29b2907d73b4a7c122b27e2293a18cc69ff2 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 27 Apr 2026 13:00:33 -0500 Subject: [PATCH 16/16] Fix tvOS test template to match existing tvOS app template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove UIWindow construction and UI setup — the existing tvOS template does not construct UIWindow. Also match the Window property style and remove unused StatusChanged event. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../tvostest/csharp/Main.cs | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs index d7af5d2da021..f6ce6b4b9ec7 100644 --- a/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs +++ b/dotnet/Templates/Microsoft.tvOS.Templates/tvostest/csharp/Main.cs @@ -12,34 +12,14 @@ [Register ("AppDelegate")] class AppDelegate : UIApplicationDelegate { - public override UIWindow? Window { get; set; } + public override UIWindow? Window { + get; + set; + } public override bool FinishedLaunching (UIApplication application, NSDictionary? launchOptions) { - Window = new UIWindow (UIScreen.MainScreen.Bounds); - var vc = new UIViewController (); - var view = vc.View!; - view.BackgroundColor = UIColor.Black; - - var label = new UILabel { - Text = "Running tests...\n", - TextAlignment = UITextAlignment.Left, - Lines = 0, - Font = UIFont.GetMonospacedSystemFont (24, UIFontWeight.Regular)!, - TextColor = UIColor.White, - TranslatesAutoresizingMaskIntoConstraints = false, - }; - view.AddSubview (label); - label.TopAnchor.ConstraintEqualTo (view.SafeAreaLayoutGuide.TopAnchor, 40).Active = true; - label.LeadingAnchor.ConstraintEqualTo (view.SafeAreaLayoutGuide.LeadingAnchor, 40).Active = true; - label.TrailingAnchor.ConstraintLessThanOrEqualTo (view.SafeAreaLayoutGuide.TrailingAnchor, -40).Active = true; - - Window.RootViewController = vc; - Window.MakeKeyAndVisible (); - var consumer = new ResultConsumer (); - consumer.StatusChanged += line => - vc.InvokeOnMainThread (() => label.Text += line + "\n"); Task.Run (async () => { try { @@ -73,7 +53,6 @@ class ResultConsumer : IDataConsumer { public int Failed => _failed; public int Skipped => _skipped; public string? TrxReportPath; - public event Action? StatusChanged; public string Uid => nameof (ResultConsumer); public string DisplayName => nameof (ResultConsumer); @@ -90,7 +69,6 @@ public Task ConsumeAsync (IDataProducer dataProducer, IData value, CancellationT Console.WriteLine ($"Results: passed={Passed}, failed={Failed}, skipped={Skipped}"); Console.WriteLine ($"TRX report: {TrxReportPath}"); - StatusChanged?.Invoke ($"\n✅ {Passed} passed ❌ {Failed} failed ⏭️ {Skipped} skipped"); } else if (value is TestNodeUpdateMessage { TestNode: var node }) { var state = node.Properties.SingleOrDefault (); string? outcome = state switch { @@ -108,9 +86,6 @@ FailedTestNodeStateProperty or ErrorTestNodeStateProperty var id = node.Properties.SingleOrDefault (); var testName = id is not null ? $"{id.Namespace}.{id.TypeName}.{id.MethodName}" : node.DisplayName; Console.WriteLine ($"[{outcome.ToUpperInvariant ()}] {testName}"); - - var icon = outcome switch { "passed" => "✅", "failed" => "❌", _ => "⏭️" }; - StatusChanged?.Invoke ($"{icon} {testName}"); } return Task.CompletedTask; }