diff --git a/packages/experimental/cua-windows/native/.gitignore b/packages/experimental/cua-windows/native/.gitignore index d519714059..afc10cfbc5 100644 --- a/packages/experimental/cua-windows/native/.gitignore +++ b/packages/experimental/cua-windows/native/.gitignore @@ -1,3 +1,4 @@ **/bin/ **/obj/ .build/ +**/.vs diff --git a/packages/experimental/cua-windows/native/CuaWindows.csproj b/packages/experimental/cua-windows/native/CuaWindows.csproj index 0cc65b6907..014cb6e37a 100644 --- a/packages/experimental/cua-windows/native/CuaWindows.csproj +++ b/packages/experimental/cua-windows/native/CuaWindows.csproj @@ -1,8 +1,7 @@ Exe - net10.0-windows10.0.19041.0 - true + net48 true true false @@ -12,15 +11,11 @@ dsh-cua-windows app.manifest true - win-x64;win-arm64 - true - true none false - diff --git a/packages/experimental/cua-windows/native/Directory.Build.props b/packages/experimental/cua-windows/native/Directory.Build.props index b4fbcbc808..f68224faae 100644 --- a/packages/experimental/cua-windows/native/Directory.Build.props +++ b/packages/experimental/cua-windows/native/Directory.Build.props @@ -1,6 +1,13 @@ + 14.0 + true $(MSBuildThisFileDirectory).build/$(MSBuildProjectName)/bin/ $(MSBuildThisFileDirectory).build/$(MSBuildProjectName)/obj/ + + + + + diff --git a/packages/experimental/cua-windows/native/cua-windows.slnx b/packages/experimental/cua-windows/native/cua-windows.slnx new file mode 100644 index 0000000000..efe33b9414 --- /dev/null +++ b/packages/experimental/cua-windows/native/cua-windows.slnx @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj b/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj index cb0fda00a0..77c960608e 100644 --- a/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj +++ b/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj @@ -1,13 +1,10 @@ Exe - net10.0-windows + net48 true - true enable enable dsh-cua-desktop-fixture - true - true diff --git a/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj.user b/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj.user new file mode 100644 index 0000000000..191764a929 --- /dev/null +++ b/packages/experimental/cua-windows/native/desktop-tests/DesktopFixture.csproj.user @@ -0,0 +1,9 @@ + + + + + + Form + + + \ No newline at end of file diff --git a/packages/experimental/cua-windows/native/packages.lock.json b/packages/experimental/cua-windows/native/packages.lock.json index dee2e0c44b..f2cf154da0 100644 --- a/packages/experimental/cua-windows/native/packages.lock.json +++ b/packages/experimental/cua-windows/native/packages.lock.json @@ -1,32 +1,56 @@ { "version": 1, "dependencies": { - "net10.0-windows10.0.19041": { - "Microsoft.NET.ILLink.Tasks": { + ".NETFramework,Version=v4.8": { + "Microsoft.NETFramework.ReferenceAssemblies": { "type": "Direct", - "requested": "[10.0.14, )", - "resolved": "10.0.14", - "contentHash": "YlTamXppEQls6DYWt7RdUuwWDb0lyw/vXCaGeQpLCpsLmfwGuCkOz/vIGgMTV7ECsJcavkCOkxZXv9s8rdAHkQ==" - }, - "Vortice.Direct3D11": { - "type": "Direct", - "requested": "[3.8.3, )", - "resolved": "3.8.3", - "contentHash": "JgFUswu2mgrSwcd0KRF2AnfeE5VbMEgcicmxPD1g2yXyomPIHbnX3wldBNHPOzzD0URC1WJ/pO1ymfi3imZwvg==", + "requested": "[1.0.3, )", + "resolved": "1.0.3", + "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", "dependencies": { - "SharpGen.Runtime": "2.4.2-beta", - "Vortice.DXGI": "3.8.3" + "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.15.0, )", + "resolved": "1.15.0", + "contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g==" + }, + "System.Text.Json": { + "type": "Direct", + "requested": "[10.0.14, 10.0.14]", + "resolved": "10.0.14", + "contentHash": "JSSLGJTJJDvS76VnLdY1X289rFcHuYApk7QGw0hCoP5wVR1mk7BvJbOYxQLXq4x1qK/Ml9OHa/AKaAbBVCfSSQ==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "10.0.14", + "System.Buffers": "4.6.1", + "System.IO.Pipelines": "10.0.14", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2", + "System.Text.Encodings.Web": "10.0.14", + "System.Threading.Tasks.Extensions": "4.6.3", + "System.ValueTuple": "4.6.2" } }, "Humanizer.Core": { "type": "Transitive", "resolved": "3.0.10", - "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==" + "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==", + "dependencies": { + "System.Collections.Immutable": "9.0.10", + "System.ComponentModel.Annotations": "5.0.0", + "System.Memory": "4.6.3" + } }, "Json.More.Net": { "type": "Transitive", "resolved": "3.0.1", - "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==" + "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==", + "dependencies": { + "System.Collections.Immutable": "10.0.5", + "System.Text.Json": "10.0.5" + } }, "JsonPointer.Net": { "type": "Transitive", @@ -45,51 +69,99 @@ "JsonPointer.Net": "7.0.2" } }, - "SharpGen.Runtime": { + "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "2.4.2-beta", - "contentHash": "niTtWAUov1F7wZGAlVeEvW+Tnqvg5yTmhI7rxmYu2Utoyu2TbC9tWWpUpMs0PQg5lu5svoYpCAztNjxCqMFP/w==" - }, - "SharpGen.Runtime.COM": { - "type": "Transitive", - "resolved": "2.4.2-beta", - "contentHash": "9lxDFMiepqo3lJQzMSjECCIONeCc2f3Drokgj6HtrTLZcJSftNgcLbD6/iXYj2iphkwgrZb1oLsDOZxoFZkawQ==", + "resolved": "10.0.14", + "contentHash": "HCu9NbiXDh9++j4eRNRHCOiKPw/7I5UEJlFIRaDM3v0+ttZaH8p8rjxSWfNgP2cGv5JAa4EZnmc/nlcUOTFlpA==", "dependencies": { - "SharpGen.Runtime": "2.4.2-beta" + "System.Threading.Tasks.Extensions": "4.6.3" } }, - "Vortice.DirectX": { + "Microsoft.NETFramework.ReferenceAssemblies.net48": { "type": "Transitive", - "resolved": "3.8.3", - "contentHash": "nKwSavv0w5rDF7prSefqAVPDcTyqrfZxKFMVfttiXPfm62VdA/1d+b3PhCZpW4xO7jXczXDwjQdWgD1zGsvM8w==", + "resolved": "1.0.3", + "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "N8GXpmiLMtljq7gwvyS+1QvKT/W2J8sNAvx+HVg4NGmsG/H+2k/y9QI23auLJRterrzCiDH+IWAw4V/GPwsMlw==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "10.0.5", + "contentHash": "nozrOKfEgfrvvswkCfxaumY68RA/x1F3ZYwtwRvva8ul91NCnUzb6MKpl5/P7u9v/nIagVL4OXXj8d007tucxw==", "dependencies": { - "SharpGen.Runtime": "2.4.2-beta", - "SharpGen.Runtime.COM": "2.4.2-beta", - "Vortice.Mathematics": "2.1.0" + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" } }, - "Vortice.DXGI": { + "System.ComponentModel.Annotations": { "type": "Transitive", - "resolved": "3.8.3", - "contentHash": "MbAUnTeQ6WD99ctAdrj5CQO2I7oaax0Kt2eVdWSUj0bYP9Ed0726+s7dIHe4+tqhpmINW/dcPt0mNtc72o+E0w==", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "pLVClkIC4XfXhcOQXNtNDJl5LYJOS4XAQAdzbqF8rj6sk2zdXO/5uikBsZqgqnAAb07z9Fmtu0sMj3TwEiBtIw==", "dependencies": { - "SharpGen.Runtime": "2.4.2-beta", - "Vortice.DirectX": "3.8.3" + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Threading.Tasks.Extensions": "4.6.3" } }, - "Vortice.Mathematics": { + "System.Memory": { "type": "Transitive", - "resolved": "2.1.0", - "contentHash": "KK+SjNSuKdP+zbavekubi+vaeb1Jo4k87ZF6CMkVWjr6RjJwc8peVtmgzXXDIMy4ZC3ZISyk3llY3q65ISOkBQ==" + "resolved": "4.6.3", + "contentHash": "qdcDOgnFZY40+Q9876JUHnlHu7bosOHX8XISRoH94fwk6hgaeQGSgfZd8srWRZNt5bV9ZW2TljcegDNxsf+96A==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Numerics.Vectors": "4.6.1", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Numerics.Vectors": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "sQxefTnhagrhoq2ReR0D/6K0zJcr9Hrd6kikeXsA1I8kOCboTavcUC4r7TSfpKFeE163uMuxZcyfO1mGO3EN8Q==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.1.2", + "contentHash": "2hBr6zdbIBTDE3EhK7NSVNdX58uTK6iHW/P/Axmm9sl1xoGSLqDvMtpecn226TNwHByFokYwJmt/aQQNlO5CRw==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "+aDpFLtsHyft9ZVx9pZQ9MILqwrr8LK1te1L39VMKQYhoYDbs+RUqBhCT3Zydb5ymi2Buo4Cn+3Wi208IxD6rw==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.6.3", + "contentHash": "7sCiwilJLYbTZELaKnc7RecBBXWXA+xMLQWZKWawBxYjp6DBlSE3v9/UcvKBvr1vv2tTOhipiogM8rRmxlhrVA==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.ValueTuple": { + "type": "Transitive", + "resolved": "4.6.2", + "contentHash": "yQgmjfFximrNm9LIV3mL6T5MzjeC+epeE5rl4hXxAlYmxby7RM1dPSkIKXk9HNkl6G54h2JHOmLD46+Pey+IRg==" }, "cuaprotocol": { "type": "Project", "dependencies": { - "JsonSchema.Net": "[9.4.0, )" + "JsonSchema.Net": "[9.4.0, )", + "System.Text.Json": "[10.0.14, 10.0.14]" } } }, - "net10.0-windows10.0.19041/win-arm64": {}, - "net10.0-windows10.0.19041/win-x64": {} + ".NETFramework,Version=v4.8/win-x86": {} } -} \ No newline at end of file +} diff --git a/packages/experimental/cua-windows/native/protocol/AccessibilityText.cs b/packages/experimental/cua-windows/native/protocol/AccessibilityText.cs index 35c6acdb75..ded98aa1cd 100644 --- a/packages/experimental/cua-windows/native/protocol/AccessibilityText.cs +++ b/packages/experimental/cua-windows/native/protocol/AccessibilityText.cs @@ -64,9 +64,9 @@ public static class AccessibilityText if (actions.Length != 0) text.Append(" actions=[").Append(string.Join(", ", actions.Select(Quote))).Append(']'); if (details) { - if (!string.IsNullOrEmpty(node.Identifier)) text.Append(" id=").Append(Quote(node.Identifier)); + if (node.Identifier is { Length: > 0 } identifier) text.Append(" id=").Append(Quote(identifier)); if (index.HasValue && node.Bounds is { } bounds) - text.Append(" bounds=[").Append(string.Join(',', new[] { bounds.X, bounds.Y, bounds.Width, bounds.Height } + text.Append(" bounds=[").Append(string.Join(",", new[] { bounds.X, bounds.Y, bounds.Width, bounds.Height } .Select(number => number.ToString("G", CultureInfo.InvariantCulture)))).Append(']'); } return text.ToString(); diff --git a/packages/experimental/cua-windows/native/protocol/CuaProtocol.csproj b/packages/experimental/cua-windows/native/protocol/CuaProtocol.csproj index 353ac1afa7..adab284210 100644 --- a/packages/experimental/cua-windows/native/protocol/CuaProtocol.csproj +++ b/packages/experimental/cua-windows/native/protocol/CuaProtocol.csproj @@ -1,10 +1,9 @@ - net10.0 + net48 enable enable true - win-x64;win-arm64 false diff --git a/packages/experimental/cua-windows/native/protocol/KeyChord.cs b/packages/experimental/cua-windows/native/protocol/KeyChord.cs index 74d375ab35..9c0e307d00 100644 --- a/packages/experimental/cua-windows/native/protocol/KeyChord.cs +++ b/packages/experimental/cua-windows/native/protocol/KeyChord.cs @@ -6,10 +6,10 @@ public sealed record KeyChord(string Key, string[] Modifiers) { if (text.Length == 0) throw new NativeFailure("INVALID_ARGUMENT", "A key name is required"); var plus = text == "+" || text.EndsWith("++", StringComparison.Ordinal); - var parts = plus ? text[..^1].TrimEnd('+').Split('+', StringSplitOptions.RemoveEmptyEntries) : text.Split('+'); + var parts = plus ? text[..^1].TrimEnd('+').Split(new[] { '+' }, StringSplitOptions.RemoveEmptyEntries) : text.Split('+'); var key = plus ? "+" : parts[^1]; if (key.Length == 0) throw new NativeFailure("INVALID_ARGUMENT", "A key chord must end with a key"); - var modifiers = (plus ? parts : parts[..^1]).Concat(extra).Select(NormalizeModifier).Distinct().ToArray(); + var modifiers = (plus ? parts : parts.Take(parts.Length - 1)).Concat(extra).Select(NormalizeModifier).Distinct().ToArray(); return new(key, modifiers); } diff --git a/packages/experimental/cua-windows/native/protocol/NativeRequest.cs b/packages/experimental/cua-windows/native/protocol/NativeRequest.cs index 8cdd6a3293..86c1029f15 100644 --- a/packages/experimental/cua-windows/native/protocol/NativeRequest.cs +++ b/packages/experimental/cua-windows/native/protocol/NativeRequest.cs @@ -80,7 +80,7 @@ public sealed class FrameReader(Stream stream) { if (start == end) { - end = await stream.ReadAsync(buffer, cancellation); + end = await stream.ReadAsync(buffer, 0, buffer.Length, cancellation); start = 0; if (end == 0) { diff --git a/packages/experimental/cua-windows/native/protocol/packages.lock.json b/packages/experimental/cua-windows/native/protocol/packages.lock.json index 4118720b93..2edb96ae39 100644 --- a/packages/experimental/cua-windows/native/protocol/packages.lock.json +++ b/packages/experimental/cua-windows/native/protocol/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net10.0": { + ".NETFramework,Version=v4.8": { "JsonSchema.Net": { "type": "Direct", "requested": "[9.4.0, )", @@ -11,15 +11,55 @@ "JsonPointer.Net": "7.0.2" } }, + "Microsoft.NETFramework.ReferenceAssemblies": { + "type": "Direct", + "requested": "[1.0.3, )", + "resolved": "1.0.3", + "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", + "dependencies": { + "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.15.0, )", + "resolved": "1.15.0", + "contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g==" + }, + "System.Text.Json": { + "type": "Direct", + "requested": "[10.0.14, 10.0.14]", + "resolved": "10.0.14", + "contentHash": "JSSLGJTJJDvS76VnLdY1X289rFcHuYApk7QGw0hCoP5wVR1mk7BvJbOYxQLXq4x1qK/Ml9OHa/AKaAbBVCfSSQ==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "10.0.14", + "System.Buffers": "4.6.1", + "System.IO.Pipelines": "10.0.14", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2", + "System.Text.Encodings.Web": "10.0.14", + "System.Threading.Tasks.Extensions": "4.6.3", + "System.ValueTuple": "4.6.2" + } + }, "Humanizer.Core": { "type": "Transitive", "resolved": "3.0.10", - "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==" + "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==", + "dependencies": { + "System.Collections.Immutable": "9.0.10", + "System.ComponentModel.Annotations": "5.0.0", + "System.Memory": "4.6.3" + } }, "Json.More.Net": { "type": "Transitive", "resolved": "3.0.1", - "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==" + "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==", + "dependencies": { + "System.Collections.Immutable": "10.0.5", + "System.Text.Json": "10.0.5" + } }, "JsonPointer.Net": { "type": "Transitive", @@ -29,9 +69,92 @@ "Humanizer.Core": "3.0.10", "Json.More.Net": "3.0.1" } + }, + "Microsoft.Bcl.AsyncInterfaces": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "HCu9NbiXDh9++j4eRNRHCOiKPw/7I5UEJlFIRaDM3v0+ttZaH8p8rjxSWfNgP2cGv5JAa4EZnmc/nlcUOTFlpA==", + "dependencies": { + "System.Threading.Tasks.Extensions": "4.6.3" + } + }, + "Microsoft.NETFramework.ReferenceAssemblies.net48": { + "type": "Transitive", + "resolved": "1.0.3", + "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "N8GXpmiLMtljq7gwvyS+1QvKT/W2J8sNAvx+HVg4NGmsG/H+2k/y9QI23auLJRterrzCiDH+IWAw4V/GPwsMlw==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "10.0.5", + "contentHash": "nozrOKfEgfrvvswkCfxaumY68RA/x1F3ZYwtwRvva8ul91NCnUzb6MKpl5/P7u9v/nIagVL4OXXj8d007tucxw==", + "dependencies": { + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "pLVClkIC4XfXhcOQXNtNDJl5LYJOS4XAQAdzbqF8rj6sk2zdXO/5uikBsZqgqnAAb07z9Fmtu0sMj3TwEiBtIw==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Threading.Tasks.Extensions": "4.6.3" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.6.3", + "contentHash": "qdcDOgnFZY40+Q9876JUHnlHu7bosOHX8XISRoH94fwk6hgaeQGSgfZd8srWRZNt5bV9ZW2TljcegDNxsf+96A==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Numerics.Vectors": "4.6.1", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Numerics.Vectors": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "sQxefTnhagrhoq2ReR0D/6K0zJcr9Hrd6kikeXsA1I8kOCboTavcUC4r7TSfpKFeE163uMuxZcyfO1mGO3EN8Q==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.1.2", + "contentHash": "2hBr6zdbIBTDE3EhK7NSVNdX58uTK6iHW/P/Axmm9sl1xoGSLqDvMtpecn226TNwHByFokYwJmt/aQQNlO5CRw==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "+aDpFLtsHyft9ZVx9pZQ9MILqwrr8LK1te1L39VMKQYhoYDbs+RUqBhCT3Zydb5ymi2Buo4Cn+3Wi208IxD6rw==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.6.3", + "contentHash": "7sCiwilJLYbTZELaKnc7RecBBXWXA+xMLQWZKWawBxYjp6DBlSE3v9/UcvKBvr1vv2tTOhipiogM8rRmxlhrVA==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.ValueTuple": { + "type": "Transitive", + "resolved": "4.6.2", + "contentHash": "yQgmjfFximrNm9LIV3mL6T5MzjeC+epeE5rl4hXxAlYmxby7RM1dPSkIKXk9HNkl6G54h2JHOmLD46+Pey+IRg==" } - }, - "net10.0/win-arm64": {}, - "net10.0/win-x64": {} + } } -} +} \ No newline at end of file diff --git a/packages/experimental/cua-windows/native/src/CaptureAdmission.cs b/packages/experimental/cua-windows/native/src/CaptureAdmission.cs deleted file mode 100644 index 5014f34f85..0000000000 --- a/packages/experimental/cua-windows/native/src/CaptureAdmission.cs +++ /dev/null @@ -1,34 +0,0 @@ -// The native operation owns its capture slot until cleanup finishes, independently of the caller's await. -using DeepSeek.Cua.Protocol; - -namespace DeepSeek.Cua.Windows; - -internal sealed class CaptureAdmission -{ - private readonly object gate = new(); - private Task? pending; - - internal Task Start(Func> operation) - { - lock (gate) - { - if (pending is { IsCompleted: false }) - throw new NativeFailure("CAPTURE_BUSY", "The previous Windows capture is still releasing its resources; UIA and input remain available"); - pending = operation(); - _ = pending.ContinueWith(completed => { _ = completed.Exception; }, CancellationToken.None, - TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); - return pending; - } - } - - internal async Task Join() - { - Task? active; - lock (gate) active = pending; - if (active is not null) - { - try { await active; } - catch (Exception error) { _ = error; /* The requesting connection owns the capture failure. */ } - } - } -} diff --git a/packages/experimental/cua-windows/native/src/ClipboardPaste.cs b/packages/experimental/cua-windows/native/src/ClipboardPaste.cs index 6244fc9fa7..ad166b5bd2 100644 --- a/packages/experimental/cua-windows/native/src/ClipboardPaste.cs +++ b/packages/experimental/cua-windows/native/src/ClipboardPaste.cs @@ -10,7 +10,7 @@ internal sealed class ClipboardPaste { private sealed class Transaction(ServiceControl control, int targetPid, uint format, byte[] payload, List<(uint Format, byte[] Data)> previous, uint originalSequence) { - internal readonly TaskCompletionSource Consumed = new(TaskCreationOptions.RunContinuationsAsynchronously); + internal readonly TaskCompletionSource Consumed = new(TaskCreationOptions.RunContinuationsAsynchronously); private uint sequence = originalSequence; private bool replaced; private bool restoring; @@ -68,7 +68,7 @@ internal sealed class ClipboardPaste rendered = true; sequence = Win32.GetClipboardSequenceNumber(); if (changed) Consumed.TrySetException(new NativeFailure("CLIPBOARD_CHANGED", "Another writer changed the clipboard during paste")); - else if (message == 0x0305) Consumed.TrySetResult(); + else if (message == 0x0305) Consumed.TrySetResult(null); } catch (Exception error) { Consumed.TrySetException(error); } finally { if (opened) Win32.CloseClipboard(); } diff --git a/packages/experimental/cua-windows/native/src/DesktopExecutor.cs b/packages/experimental/cua-windows/native/src/DesktopExecutor.cs index 7e9b33a9e0..88dd5c0aef 100644 --- a/packages/experimental/cua-windows/native/src/DesktopExecutor.cs +++ b/packages/experimental/cua-windows/native/src/DesktopExecutor.cs @@ -14,7 +14,7 @@ internal sealed class ClientState internal void Clear() { foreach (var app in Apps.Values) app.Dispose(); Apps.Clear(); Launches.Clear(); } } -internal sealed class DesktopExecutor(MtaDispatcher mta, StaDispatcher sta, int graceMs) : IAsyncDisposable +internal sealed class DesktopExecutor(MtaDispatcher mta, StaDispatcher sta) : IAsyncDisposable { private readonly WindowCapture capture = new(); private readonly ClipboardPaste clipboard = new(); @@ -75,13 +75,13 @@ internal sealed class DesktopExecutor(MtaDispatcher mta, StaDispatcher sta, int var context = new RequestContext(config, cancellation, mta, sta); context.Check(); var parameters = request.Params; - if (request.Method == "permissionStatus") return DesktopSession.Status(await capture.IsSupported(cancellation)); + if (request.Method == "permissionStatus") return DesktopSession.Status(false); if (request.Method == "applicationIcons") return await sta.Invoke(_ => Applications.Icons(parameters, context), cancellation); if (request.Method == "getCapabilities") { var locked = DesktopSession.Locked(); return new { permissions = new { accessibility = locked == false, - screenRecording = locked == false && await capture.IsSupported(cancellation) }, + screenRecording = false }, sessionLocked = locked }; } if (request.Method is "requestPermission" or "openPermissionSettings") @@ -255,10 +255,9 @@ internal sealed class DesktopExecutor(MtaDispatcher mta, StaDispatcher sta, int finally { queue.Release(); } } - public async ValueTask DisposeAsync() + public ValueTask DisposeAsync() { - try { await capture.DisposeAsync().AsTask().WaitAsync(TimeSpan.FromMilliseconds(graceMs)); } - catch (TimeoutException) { NativeServer.Fatal("NATIVE_CLEANUP", "The idle desktop service could not release capture resources"); } queue.Dispose(); + return default; } } diff --git a/packages/experimental/cua-windows/native/src/Dispatchers.cs b/packages/experimental/cua-windows/native/src/Dispatchers.cs index 3bc7785457..a8d4fb180e 100644 --- a/packages/experimental/cua-windows/native/src/Dispatchers.cs +++ b/packages/experimental/cua-windows/native/src/Dispatchers.cs @@ -31,8 +31,8 @@ internal sealed record NativeConfig(int MaxRequestBytes, int MaxResponseBytes, i internal sealed class MtaDispatcher : IAsyncDisposable { private readonly BlockingCollection queue = new(); - private readonly TaskCompletionSource stopped = new(TaskCreationOptions.RunContinuationsAsynchronously); - private readonly TaskCompletionSource ready = new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly TaskCompletionSource stopped = new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly TaskCompletionSource ready = new(TaskCreationOptions.RunContinuationsAsynchronously); private readonly Thread thread; internal MtaDispatcher() @@ -45,11 +45,11 @@ internal sealed class MtaDispatcher : IAsyncDisposable Marshal.ThrowExceptionForHR(Win32.RoInitialize(1)); initialized = true; Win32.SetThreadDpiAwarenessContext(-4); - ready.SetResult(); + ready.SetResult(null); foreach (var work in queue.GetConsumingEnumerable()) work(); } catch (Exception error) { ready.TrySetException(error); } - finally { if (initialized) Win32.RoUninitialize(); stopped.TrySetResult(); } + finally { if (initialized) Win32.RoUninitialize(); stopped.TrySetResult(null); } }) { IsBackground = true, Name = "dsh-cua-uia" }; thread.SetApartmentState(ApartmentState.MTA); thread.Start(); @@ -93,7 +93,7 @@ internal sealed class ServiceControl : Forms.Control internal sealed class StaDispatcher : IAsyncDisposable { private readonly TaskCompletionSource ready = new(TaskCreationOptions.RunContinuationsAsynchronously); - private readonly TaskCompletionSource stopped = new(TaskCreationOptions.RunContinuationsAsynchronously); + private readonly TaskCompletionSource stopped = new(TaskCreationOptions.RunContinuationsAsynchronously); private readonly ConcurrentDictionary epochs = new(); private readonly Thread thread; private Win32.WinEvent? windowEvents; @@ -122,7 +122,7 @@ internal sealed class StaDispatcher : IAsyncDisposable finally { if (hook != 0) Win32.UnhookWinEvent(hook); - stopped.TrySetResult(); + stopped.TrySetResult(null); } }) { IsBackground = true, Name = "dsh-cua-clipboard" }; thread.SetApartmentState(ApartmentState.STA); diff --git a/packages/experimental/cua-windows/native/src/NativeServer.cs b/packages/experimental/cua-windows/native/src/NativeServer.cs index 866cc0588b..2821df97ea 100644 --- a/packages/experimental/cua-windows/native/src/NativeServer.cs +++ b/packages/experimental/cua-windows/native/src/NativeServer.cs @@ -33,7 +33,7 @@ internal static class NativeServer await using var sta = new StaDispatcher(); await sta.Invoke(() => { }, lifetime.Token); await mta.Invoke(() => true, lifetime.Token); - await using var executor = new DesktopExecutor(mta, sta, graceMs); + await using var executor = new DesktopExecutor(mta, sta); var clients = new ConcurrentDictionary(); NamedPipeServerStream? listener = NewPipe(pipeName); var membership = new object(); @@ -162,6 +162,7 @@ internal static class NativeServer try { response = new { id = request.Id, result = await operation }; } catch (OperationCanceledException) { response = Failure(request.Id, "NATIVE_CANCELLED", "Native operation cancelled; observe before deciding on further input"); } catch (NativeFailure error) { response = Failure(request.Id, error.Code, error.Message); } + catch (NotImplementedException error) { response = Failure(request.Id, "NOT_IMPLEMENTED", error.Message); } catch (ElementNotAvailableException) { response = Failure(request.Id, "STALE_SNAPSHOT", "An accessibility element disappeared; read fresh state"); } catch (ElementNotEnabledException) { response = Failure(request.Id, "ELEMENT_DISABLED", "The selected control is disabled"); } catch (UnauthorizedAccessException) { response = Failure(request.Id, "PERMISSION_DENIED", "Windows refused access to the selected application"); } diff --git a/packages/experimental/cua-windows/native/src/WindowCapture.cs b/packages/experimental/cua-windows/native/src/WindowCapture.cs index b72a219b3f..4a3e4f6e5f 100644 --- a/packages/experimental/cua-windows/native/src/WindowCapture.cs +++ b/packages/experimental/cua-windows/native/src/WindowCapture.cs @@ -1,243 +1,7 @@ -// Windows Graphics Capture returns the selected window even when another window covers it. -using System.Drawing; -using System.Drawing.Imaging; -using System.Runtime.InteropServices; -using DeepSeek.Cua.Protocol; -using Vortice.Direct3D; -using Vortice.Direct3D11; -using Vortice.DXGI; -using WinRT; -using global::Windows.Graphics.Capture; -using global::Windows.Graphics.DirectX; -using global::Windows.Graphics.DirectX.Direct3D11; - namespace DeepSeek.Cua.Windows; -internal sealed class WindowCapture : IAsyncDisposable +internal sealed class WindowCapture { - private readonly MtaDispatcher dispatcher = new(); - private readonly CaptureAdmission admission = new(); - private ID3D11Device? device; - private ID3D11DeviceContext? immediate; - private IDirect3DDevice? captureDevice; - - internal Task IsSupported(CancellationToken cancellation) - => dispatcher.Invoke(GraphicsCaptureSession.IsSupported, cancellation); - - private void EnsureDevice() - { - if (device is not null) return; - var created = D3D11.D3D11CreateDevice(DriverType.Hardware, DeviceCreationFlags.BgraSupport); - try - { - using var dxgi = created.QueryInterface(); - Marshal.ThrowExceptionForHR(CreateDirect3D11DeviceFromDXGIDevice(dxgi.NativePointer, out var pointer)); - try { captureDevice = MarshalInterface.FromAbi(pointer); } - finally { Marshal.Release(pointer); } - immediate = created.ImmediateContext; - device = created; - } - catch { created.Dispose(); throw; } - } - - internal async Task Capture(AppState app, WindowState window, RequestContext context) - { - if (!await IsSupported(context.Cancellation)) throw new NativeFailure("UNSUPPORTED", "Windows Graphics Capture is unavailable on this desktop"); - var geometry = window.Geometry(app, context); - if (!window.IsOnScreen()) throw new NativeFailure("WINDOW_NOT_VISIBLE", "Restore the selected window with show and observe again before capturing"); - try - { - var operation = admission.Start(() => CaptureOwned(window.Handle, geometry, context)); - var data = await operation.WaitAsync(context.Cancellation); - var current = window.Geometry(app, context); - if (current.Pixels.Width != geometry.Pixels.Width || current.Pixels.Height != geometry.Pixels.Height || current.Dpi != geometry.Dpi) - throw new NativeFailure("WINDOW_CHANGED", "The window changed during capture; observe again"); - DesktopSession.RequireInteractive(); - window.Observe(current); - return new { mimeType = "image/png", data = Convert.ToBase64String(data), pixelWidth = geometry.Pixels.Width, - pixelHeight = geometry.Pixels.Height, windowId = window.Id, bounds = current.Bounds, coordinateSpace = "window-pixels" }; - } - catch (COMException error) - { - throw new NativeFailure(error.HResult == unchecked((int)0x80070005) ? "PERMISSION_DENIED" : "CAPTURE_FAILED", - $"Windows refused the selected window capture (0x{error.HResult:X8}); restore the window and read fresh state"); - } - } - - private async Task CaptureOwned(nint window, WindowGeometry geometry, RequestContext context) - { - CaptureRequest? request = null; - try - { - await dispatcher.Invoke(() => - { - EnsureDevice(); - request = new CaptureRequest(this, window, geometry, context); - return true; - }, context.Cancellation); - return await request!.Result.WaitAsync(context.Cancellation); - } - finally - { - if (request is not null) await dispatcher.Invoke(() => { request.Dispose(); return true; }, CancellationToken.None); - } - } - - private sealed class CaptureRequest : IDisposable - { - private readonly object gate = new(); - private readonly TaskCompletionSource result = new(TaskCreationOptions.RunContinuationsAsynchronously); - private readonly WindowCapture owner; - private readonly WindowGeometry geometry; - private readonly RequestContext context; - private readonly GraphicsCaptureItem item; - private Direct3D11CaptureFramePool? pool; - private GraphicsCaptureSession? session; - private bool disposed; - - internal Task Result => result.Task; - - internal CaptureRequest(WindowCapture owner, nint window, WindowGeometry geometry, RequestContext context) - { - this.owner = owner; this.geometry = geometry; this.context = context; - item = ItemForWindow(window); - if (item.Size.Width != geometry.Pixels.Width || item.Size.Height != geometry.Pixels.Height) - throw new NativeFailure("WINDOW_CHANGED", "Windows capture bounds differ from the observed window; restore it and observe again"); - try - { - pool = Direct3D11CaptureFramePool.CreateFreeThreaded(owner.captureDevice!, DirectXPixelFormat.B8G8R8A8UIntNormalized, 2, item.Size); - pool.FrameArrived += Frame; - item.Closed += Closed; - session = pool.CreateCaptureSession(item); - session.IsCursorCaptureEnabled = false; - session.StartCapture(); - } - catch { Dispose(); throw; } - } - - private void Closed(GraphicsCaptureItem sender, object args) => result.TrySetException(new NativeFailure("WINDOW_CHANGED", "The selected window closed during capture")); - - private void Frame(Direct3D11CaptureFramePool sender, object args) - { - lock (gate) - { - if (disposed || result.Task.IsCompleted) return; - try - { - context.Check(); - using var frame = sender.TryGetNextFrame(); - if (frame is null) return; - if (frame.ContentSize.Width != geometry.Pixels.Width || frame.ContentSize.Height != geometry.Pixels.Height) - throw new NativeFailure("WINDOW_CHANGED", "The capture frame dimensions changed"); - result.TrySetResult(owner.Encode(frame.Surface, geometry.Pixels.Width, geometry.Pixels.Height, context)); - } - catch (Exception error) { result.TrySetException(error); } - } - } - - public void Dispose() - { - lock (gate) - { - if (disposed) return; - disposed = true; - item.Closed -= Closed; - if (pool is not null) pool.FrameArrived -= Frame; - } - // Native disposal can wait for callbacks; queued callbacks must be able to observe disposed. - session?.Dispose(); - pool?.Dispose(); - } - } - - private byte[] Encode(IDirect3DSurface surface, int width, int height, RequestContext context) - { - var access = surface.As(); - var textureId = typeof(ID3D11Texture2D).GUID; - Marshal.ThrowExceptionForHR(access.GetInterface(ref textureId, out var pointer)); - using var texture = new ID3D11Texture2D(pointer); - if (texture.Description.Width != width || texture.Description.Height != height || texture.Description.Format != Format.B8G8R8A8_UNorm) - throw new NativeFailure("WINDOW_CHANGED", "The captured texture differs from the selected window geometry"); - var description = new Texture2DDescription(Format.B8G8R8A8_UNorm, (uint)width, (uint)height, - mipLevels: 1, bindFlags: BindFlags.None, usage: ResourceUsage.Staging, cpuAccessFlags: CpuAccessFlags.Read); - using var staging = device!.CreateTexture2D(description); - immediate!.CopyResource(staging, texture); - var mapped = immediate.Map(staging, 0, MapMode.Read); - using var bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); - try - { - var pixels = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); - try - { - var row = new byte[checked(width * 4)]; - for (var y = 0; y < height; y++) - { - context.Check(); - Marshal.Copy(mapped.DataPointer + checked(y * (int)mapped.RowPitch), row, 0, row.Length); - Marshal.Copy(row, 0, pixels.Scan0 + y * pixels.Stride, row.Length); - } - } - finally { bitmap.UnlockBits(pixels); } - } - finally { immediate.Unmap(staging, 0); } - context.Check(); - using var output = new MemoryStream(); - bitmap.Save(output, ImageFormat.Png); - if (output.Length * 4 / 3 > context.Config.MaxResponseBytes) - throw new NativeFailure("NATIVE_RESPONSE_LIMIT", "The screenshot exceeds the response byte limit"); - return output.ToArray(); - } - - private static GraphicsCaptureItem ItemForWindow(nint window) - { - const string className = "Windows.Graphics.Capture.GraphicsCaptureItem"; - Marshal.ThrowExceptionForHR(WindowsCreateString(className, className.Length, out var name)); - nint factoryPointer = 0; - object? factory = null; - try - { - var factoryId = typeof(IGraphicsCaptureItemInterop).GUID; - Marshal.ThrowExceptionForHR(RoGetActivationFactory(name, ref factoryId, out factoryPointer)); - factory = Marshal.GetObjectForIUnknown(factoryPointer); - var itemId = new Guid("79C3F95B-31F7-4EC2-A464-632EF5D30760"); - Marshal.ThrowExceptionForHR(((IGraphicsCaptureItemInterop)factory).CreateForWindow(window, ref itemId, out var item)); - try { return MarshalInterface.FromAbi(item); } - finally { Marshal.Release(item); } - } - finally - { - if (factory is not null) Marshal.FinalReleaseComObject(factory); - if (factoryPointer != 0) Marshal.Release(factoryPointer); - WindowsDeleteString(name); - } - } - - public async ValueTask DisposeAsync() - { - await admission.Join(); - await dispatcher.Invoke(() => - { - captureDevice?.Dispose(); - immediate?.Dispose(); - device?.Dispose(); - return true; - }, CancellationToken.None); - await dispatcher.DisposeAsync(); - } - - [ComImport, Guid("3628E81B-3CAC-4C60-B7F4-23CE0E0C3356"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - private interface IGraphicsCaptureItemInterop - { - [PreserveSig] int CreateForWindow(nint window, ref Guid id, out nint item); - [PreserveSig] int CreateForMonitor(nint monitor, ref Guid id, out nint item); - } - [ComImport, Guid("A9B3D012-3DF2-4EE3-B8D1-8695F457D3C1"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - private interface IDirect3DDxgiInterfaceAccess - { - [PreserveSig] int GetInterface(ref Guid id, out nint value); - } - [DllImport("d3d11.dll", ExactSpelling = true)] private static extern int CreateDirect3D11DeviceFromDXGIDevice(nint device, out nint result); - [DllImport("combase.dll", CharSet = CharSet.Unicode)] private static extern int WindowsCreateString(string source, int length, out nint value); - [DllImport("combase.dll")] private static extern int WindowsDeleteString(nint value); - [DllImport("combase.dll")] private static extern int RoGetActivationFactory(nint name, ref Guid id, out nint value); + internal Task Capture(AppState app, WindowState window, RequestContext context) + => throw new NotImplementedException("Windows screenshots are not implemented."); } diff --git a/packages/experimental/cua-windows/native/tests/Program.cs b/packages/experimental/cua-windows/native/tests/Program.cs index b12458997a..d352580306 100644 --- a/packages/experimental/cua-windows/native/tests/Program.cs +++ b/packages/experimental/cua-windows/native/tests/Program.cs @@ -1,7 +1,6 @@ // Portable checks exercise admission, framing, text offsets, and model-visible formatting. using System.Text; using DeepSeek.Cua.Protocol; -using DeepSeek.Cua.Windows; var checks = 0; void Check(bool condition, string message) @@ -75,22 +74,4 @@ Check(!AccessibilityText.Retain(new() { Role = "AXGroup" }), "Empty structural c Check(AccessibilityText.Retain(new() { Role = "AXGroup", Actions = ["Copy"] }), "Actionable containers retain their row"); Check(AccessibilityText.Format(new() { Role = "AXTextArea", Value = "abc", HasValue = true, HasSelection = true, Selection = new(2, 5) }, 0, false) .Contains("selection=unavailable"), "Out-of-range selections do not describe valid text"); -var captures = new CaptureAdmission(); -var cleanup = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); -var ownedCapture = captures.Start(() => cleanup.Task); -using var cancelled = new CancellationTokenSource(); -cancelled.Cancel(); -try { await ownedCapture.WaitAsync(cancelled.Token); throw new Exception("Cancelled capture caller remained attached"); } -catch (OperationCanceledException) { checks++; } -Refuses(() => captures.Start(() => Task.FromResult(new byte[] { 2 })), "CAPTURE_BUSY"); -var joined = captures.Join(); -Check(!joined.IsCompleted, "Native cleanup retains ownership after its caller stops waiting"); -cleanup.SetResult([1]); -await joined; -Check((await captures.Start(() => Task.FromResult(new byte[] { 2 })))[0] == 2, "Completed cleanup admits a fresh capture"); -var failed = captures.Start(() => Task.FromException(new NativeFailure("CAPTURE_FAILED", "device lost"))); -try { await failed; throw new Exception("Capture error disappeared"); } -catch (NativeFailure failure) { Check(failure.Code == "CAPTURE_FAILED", "Capture failure remains attached to its requesting connection"); } -await captures.Join(); -Check((await captures.Start(() => Task.FromResult(new byte[] { 3 })))[0] == 3, "A settled capture failure does not reserve a permanent slot"); Console.WriteLine($"{checks} portable CUA checks passed"); diff --git a/packages/experimental/cua-windows/native/tests/Protocol.Tests.csproj b/packages/experimental/cua-windows/native/tests/Protocol.Tests.csproj index 9ad2abfcee..99d820c0d3 100644 --- a/packages/experimental/cua-windows/native/tests/Protocol.Tests.csproj +++ b/packages/experimental/cua-windows/native/tests/Protocol.Tests.csproj @@ -1,11 +1,10 @@ Exe - net10.0 + net48 enable enable true - diff --git a/packages/experimental/cua-windows/native/tests/packages.lock.json b/packages/experimental/cua-windows/native/tests/packages.lock.json index f693fbd9af..44acac2f65 100644 --- a/packages/experimental/cua-windows/native/tests/packages.lock.json +++ b/packages/experimental/cua-windows/native/tests/packages.lock.json @@ -1,16 +1,56 @@ { "version": 1, "dependencies": { - "net10.0": { + ".NETFramework,Version=v4.8": { + "Microsoft.NETFramework.ReferenceAssemblies": { + "type": "Direct", + "requested": "[1.0.3, )", + "resolved": "1.0.3", + "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", + "dependencies": { + "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.15.0, )", + "resolved": "1.15.0", + "contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g==" + }, + "System.Text.Json": { + "type": "Direct", + "requested": "[10.0.14, 10.0.14]", + "resolved": "10.0.14", + "contentHash": "JSSLGJTJJDvS76VnLdY1X289rFcHuYApk7QGw0hCoP5wVR1mk7BvJbOYxQLXq4x1qK/Ml9OHa/AKaAbBVCfSSQ==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "10.0.14", + "System.Buffers": "4.6.1", + "System.IO.Pipelines": "10.0.14", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2", + "System.Text.Encodings.Web": "10.0.14", + "System.Threading.Tasks.Extensions": "4.6.3", + "System.ValueTuple": "4.6.2" + } + }, "Humanizer.Core": { "type": "Transitive", "resolved": "3.0.10", - "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==" + "contentHash": "yZIhtw8sYuvsONzQbZxWpR60tMWYHXoo0DL6nyOqSFiU5POjBTSEyWFpTQtJEZuy+oqiYTXKXY/Mjx7KnqIQFw==", + "dependencies": { + "System.Collections.Immutable": "9.0.10", + "System.ComponentModel.Annotations": "5.0.0", + "System.Memory": "4.6.3" + } }, "Json.More.Net": { "type": "Transitive", "resolved": "3.0.1", - "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==" + "contentHash": "fRctF2J2SILYG6wqP21drmeEODmCVkVQ/b3MndDu2fT1swfySyUgq7ePCk+aENGlDcIm05fyfjh9vcuqDEfv3w==", + "dependencies": { + "System.Collections.Immutable": "10.0.5", + "System.Text.Json": "10.0.5" + } }, "JsonPointer.Net": { "type": "Transitive", @@ -29,12 +69,99 @@ "JsonPointer.Net": "7.0.2" } }, + "Microsoft.Bcl.AsyncInterfaces": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "HCu9NbiXDh9++j4eRNRHCOiKPw/7I5UEJlFIRaDM3v0+ttZaH8p8rjxSWfNgP2cGv5JAa4EZnmc/nlcUOTFlpA==", + "dependencies": { + "System.Threading.Tasks.Extensions": "4.6.3" + } + }, + "Microsoft.NETFramework.ReferenceAssemblies.net48": { + "type": "Transitive", + "resolved": "1.0.3", + "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ==" + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "N8GXpmiLMtljq7gwvyS+1QvKT/W2J8sNAvx+HVg4NGmsG/H+2k/y9QI23auLJRterrzCiDH+IWAw4V/GPwsMlw==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "10.0.5", + "contentHash": "nozrOKfEgfrvvswkCfxaumY68RA/x1F3ZYwtwRvva8ul91NCnUzb6MKpl5/P7u9v/nIagVL4OXXj8d007tucxw==", + "dependencies": { + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "pLVClkIC4XfXhcOQXNtNDJl5LYJOS4XAQAdzbqF8rj6sk2zdXO/5uikBsZqgqnAAb07z9Fmtu0sMj3TwEiBtIw==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Threading.Tasks.Extensions": "4.6.3" + } + }, + "System.Memory": { + "type": "Transitive", + "resolved": "4.6.3", + "contentHash": "qdcDOgnFZY40+Q9876JUHnlHu7bosOHX8XISRoH94fwk6hgaeQGSgfZd8srWRZNt5bV9ZW2TljcegDNxsf+96A==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Numerics.Vectors": "4.6.1", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Numerics.Vectors": { + "type": "Transitive", + "resolved": "4.6.1", + "contentHash": "sQxefTnhagrhoq2ReR0D/6K0zJcr9Hrd6kikeXsA1I8kOCboTavcUC4r7TSfpKFeE163uMuxZcyfO1mGO3EN8Q==" + }, + "System.Runtime.CompilerServices.Unsafe": { + "type": "Transitive", + "resolved": "6.1.2", + "contentHash": "2hBr6zdbIBTDE3EhK7NSVNdX58uTK6iHW/P/Axmm9sl1xoGSLqDvMtpecn226TNwHByFokYwJmt/aQQNlO5CRw==" + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "+aDpFLtsHyft9ZVx9pZQ9MILqwrr8LK1te1L39VMKQYhoYDbs+RUqBhCT3Zydb5ymi2Buo4Cn+3Wi208IxD6rw==", + "dependencies": { + "System.Buffers": "4.6.1", + "System.Memory": "4.6.3", + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.6.3", + "contentHash": "7sCiwilJLYbTZELaKnc7RecBBXWXA+xMLQWZKWawBxYjp6DBlSE3v9/UcvKBvr1vv2tTOhipiogM8rRmxlhrVA==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.1.2" + } + }, + "System.ValueTuple": { + "type": "Transitive", + "resolved": "4.6.2", + "contentHash": "yQgmjfFximrNm9LIV3mL6T5MzjeC+epeE5rl4hXxAlYmxby7RM1dPSkIKXk9HNkl6G54h2JHOmLD46+Pey+IRg==" + }, "cuaprotocol": { "type": "Project", "dependencies": { - "JsonSchema.Net": "[9.4.0, )" + "JsonSchema.Net": "[9.4.0, )", + "System.Text.Json": "[10.0.14, 10.0.14]" } } - } + }, + ".NETFramework,Version=v4.8/win-x86": {} } -} +} \ No newline at end of file diff --git a/packages/experimental/cua-windows/package.json b/packages/experimental/cua-windows/package.json index b2779ebe25..770a6c2baf 100644 --- a/packages/experimental/cua-windows/package.json +++ b/packages/experimental/cua-windows/package.json @@ -86,7 +86,7 @@ "src" ], "scripts": { - "build:native": "dotnet publish native/CuaWindows.csproj --configuration Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableWindowsTargeting=true" + "build:native": "dotnet build native/CuaWindows.csproj --configuration Release --framework net48" }, "os": [ "win32",