diff --git a/nuget/Microsoft.Windows.CsWinMD.Generator.targets b/nuget/Microsoft.Windows.CsWinMD.Generator.targets
new file mode 100644
index 0000000000..5590eca63b
--- /dev/null
+++ b/nuget/Microsoft.Windows.CsWinMD.Generator.targets
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+ $(IntermediateOutputPath)
+ <_CsWinRTWinMDOutputPath>$(CsWinRTWinMDOutputDirectory)$(AssemblyName).winmd
+
+
+ <_RunCsWinRTWinMDGeneratorPropertyInputsCachePath Condition="'$(_RunCsWinRTWinMDGeneratorPropertyInputsCachePath)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).cswinrtwinmdgen.cache
+ <_RunCsWinRTWinMDGeneratorPropertyInputsCachePath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(_RunCsWinRTWinMDGeneratorPropertyInputsCachePath)'))
+
+
+
+
+
+ $(_CsWinRTToolsDirectory)
+
+
+
+
+
+
+
+ <_RunCsWinRTWinMDGeneratorInputsCacheToHash Include="$(CsWinRTWinMDGenEffectiveToolsDirectory)" />
+ <_RunCsWinRTWinMDGeneratorInputsCacheToHash Include="$(CsWinRTUseWindowsUIXamlProjections)" />
+ <_RunCsWinRTWinMDGeneratorInputsCacheToHash Include="$(AssemblyVersion)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nuget/Microsoft.Windows.CsWinRT.targets b/nuget/Microsoft.Windows.CsWinRT.targets
index 8ae76bd4f6..d59c77c9c5 100644
--- a/nuget/Microsoft.Windows.CsWinRT.targets
+++ b/nuget/Microsoft.Windows.CsWinRT.targets
@@ -586,6 +586,7 @@ $(CsWinRTInternalProjection)
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 4d76517b1c..8d3fa0ea34 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -44,6 +44,7 @@
$(MSBuildThisFileDirectory)WinRT.Interop.Generator\bin\$(Configuration)\net10.0\$(_CsWinRTToolsArchFolder)
$(MSBuildThisFileDirectory)WinRT.Impl.Generator\bin\$(Configuration)\net10.0\$(_CsWinRTToolsArchFolder)
$(MSBuildThisFileDirectory)WinRT.Projection.Generator\bin\$(Configuration)\net10.0\$(_CsWinRTToolsArchFolder)
+ $(MSBuildThisFileDirectory)WinRT.WinMD.Generator\bin\$(Configuration)\net10.0\$(_CsWinRTToolsArchFolder)
AnyCPU
diff --git a/src/Tests/AuthoringTest/AuthoringTest.csproj b/src/Tests/AuthoringTest/AuthoringTest.csproj
index f545de49b7..c2b6147a39 100644
--- a/src/Tests/AuthoringTest/AuthoringTest.csproj
+++ b/src/Tests/AuthoringTest/AuthoringTest.csproj
@@ -42,7 +42,6 @@
-
diff --git a/src/Tests/AuthoringTest/Program.cs b/src/Tests/AuthoringTest/Program.cs
index f5b7a80f73..b4005194bf 100644
--- a/src/Tests/AuthoringTest/Program.cs
+++ b/src/Tests/AuthoringTest/Program.cs
@@ -1,7 +1,3 @@
-using Microsoft.UI.Xaml;
-using Microsoft.UI.Xaml.Controls;
-using Microsoft.UI.Xaml.Data;
-using Microsoft.UI.Xaml.Markup;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -10,18 +6,20 @@
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
+using AuthoringTest;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Markup;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Foundation.Metadata;
using Windows.Graphics.Effects;
-using WinRT;
-using WinRT.Interop;
+using WindowsRuntime;
+using WindowsRuntime.InteropServices;
+using WindowsRuntime.Xaml;
#pragma warning disable CA1416
@@ -136,7 +134,7 @@ public BasicClass ReturnParameter(BasicClass basicClass)
return basicClass;
}
- public BasicStruct[] ReturnArray([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray] BasicStruct[] basicStructs)
+ public BasicStruct[] ReturnArray(ReadOnlySpan basicStructs)
{
BasicStruct[] copy = new BasicStruct[basicStructs.Length];
for (int idx = 0; idx < copy.Length; idx++)
@@ -146,12 +144,17 @@ public BasicStruct[] ReturnArray([System.Runtime.InteropServices.WindowsRuntime.
return copy;
}
- public int GetSum([System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArray] int[] arr)
+ public int GetSum(ReadOnlySpan arr)
{
- return arr.Sum();
+ int sum = 0;
+ foreach (int value in arr)
+ {
+ sum += value;
+ }
+ return sum;
}
- public void PopulateArray([System.Runtime.InteropServices.WindowsRuntime.WriteOnlyArray] int[] arr)
+ public void PopulateArray(Span arr)
{
for (int idx = 0; idx < arr.Length; idx++)
{
@@ -200,7 +203,7 @@ public sealed class CustomWWW : IWwwFormUrlDecoderEntry
public string Value => "CsWinRT";
}
- [GeneratedBindableCustomProperty]
+ [GeneratedCustomPropertyProvider]
public sealed partial class CustomProperty
{
public int Number { get; } = 4;
@@ -209,7 +212,7 @@ public sealed partial class CustomProperty
public CustomPropertyStructType CustomPropertyStructType => new CustomPropertyStructType();
}
- [GeneratedBindableCustomProperty]
+ [GeneratedCustomPropertyProvider]
public partial struct CustomPropertyStructType
{
// Public WinRT struct types must have at least one field
@@ -219,14 +222,14 @@ public partial struct CustomPropertyStructType
public string Value => "CsWinRTFromStructType";
}
- [GeneratedBindableCustomProperty]
+ [GeneratedCustomPropertyProvider]
internal sealed partial record CustomPropertyRecordType
{
public int Number { get; } = 4;
public string Value => "CsWinRTFromRecordType";
}
- [GeneratedBindableCustomProperty]
+ [GeneratedCustomPropertyProvider]
internal partial record struct CustomPropertyRecordStructType
{
public int Number => 4;
@@ -241,7 +244,7 @@ public static class CustomPropertyRecordTypeFactory
public static object CreateRecordStruct() => default(CustomPropertyRecordStructType);
}
-
+
public sealed partial class CustomPropertyProviderWithExplicitImplementation : ICustomPropertyProvider
{
public Type Type => typeof(CustomPropertyProviderWithExplicitImplementation);
@@ -489,7 +492,7 @@ public IAsyncOperationWithProgress GetDoubleAsyncOperation()
public IAsyncOperation GetStructAsyncOperation()
{
- return System.Runtime.InteropServices.WindowsRuntime.AsyncInfo.FromResult(new BasicStruct() { X = 2, Y = 4, Value = "Test" });
+ return WindowsRuntime.InteropServices.AsyncInfo.FromResult(new BasicStruct() { X = 2, Y = 4, Value = "Test" });
}
public IAsyncOperation GetBoolAsyncOperation()
@@ -625,7 +628,7 @@ public IList