diff --git a/src/WinRT.Interop.Generator/Extensions/WindowsRuntimeExtensions.cs b/src/WinRT.Interop.Generator/Extensions/WindowsRuntimeExtensions.cs
index b78b155bf..791bc3859 100644
--- a/src/WinRT.Interop.Generator/Extensions/WindowsRuntimeExtensions.cs
+++ b/src/WinRT.Interop.Generator/Extensions/WindowsRuntimeExtensions.cs
@@ -199,6 +199,9 @@ public bool IsCustomMappedWindowsRuntimeNonGenericInterfaceType(InteropReference
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.IDisposable) ||
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.IServiceProvider) ||
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.ICommand) ||
+ SignatureComparer.IgnoreVersion.Equals(type, interopReferences.IEnumerable) ||
+ SignatureComparer.IgnoreVersion.Equals(type, interopReferences.IEnumerator) ||
+ SignatureComparer.IgnoreVersion.Equals(type, interopReferences.IList) ||
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.INotifyCollectionChanged) ||
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.INotifyDataErrorInfo) ||
SignatureComparer.IgnoreVersion.Equals(type, interopReferences.INotifyPropertyChanged);
diff --git a/src/WinRT.Interop.Generator/Helpers/GuidGenerator.cs b/src/WinRT.Interop.Generator/Helpers/GuidGenerator.cs
index 32261265f..49493ab62 100644
--- a/src/WinRT.Interop.Generator/Helpers/GuidGenerator.cs
+++ b/src/WinRT.Interop.Generator/Helpers/GuidGenerator.cs
@@ -44,13 +44,22 @@ public static Guid CreateIID(TypeSignature type, InteropReferences interopRefere
/// interfaces and, if necessary, the type's .
///
/// The type descriptor to try to get the IID for.
+ /// Whether to use Windows.UI.Xaml projections.
/// The instance to use.
/// The resulting value, if found.
/// Whether was succesfully retrieved.
- public static bool TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(ITypeDescriptor type, InteropReferences interopReferences, out Guid iid)
+ public static bool TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(
+ ITypeDescriptor type,
+ bool useWindowsUIXamlProjections,
+ InteropReferences interopReferences,
+ out Guid iid)
{
// First try to get the IID from the custom-mapped types mapping
- if (WellKnownInterfaceIIDs.TryGetGUID(type, interopReferences, out iid))
+ if (WellKnownInterfaceIIDs.TryGetGUID(
+ interfaceType: type,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ guid: out iid))
{
return true;
}
diff --git a/src/WinRT.Interop.Generator/Helpers/SignatureGenerator.Projections.cs b/src/WinRT.Interop.Generator/Helpers/SignatureGenerator.Projections.cs
index a314c959b..0ebce8c72 100644
--- a/src/WinRT.Interop.Generator/Helpers/SignatureGenerator.Projections.cs
+++ b/src/WinRT.Interop.Generator/Helpers/SignatureGenerator.Projections.cs
@@ -24,7 +24,11 @@ internal partial class SignatureGenerator
private static string? GenericInstance(GenericInstanceTypeSignature typeSignature, InteropReferences interopReferences, bool useWindowsUIXamlProjections)
{
// If we fail to get the IID of the generic interface, we can't do anything else
- if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(typeSignature.GenericType, interopReferences, out Guid interfaceIid))
+ if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(
+ type: typeSignature.GenericType,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ iid: out Guid interfaceIid))
{
return null;
}
@@ -129,7 +133,11 @@ internal partial class SignatureGenerator
private static string? Delegate(TypeDefinition typeDefinition, InteropReferences interopReferences, bool useWindowsUIXamlProjections)
{
// Just like for generic instantiations, we need to resolve the IID for the type first
- if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(typeDefinition, interopReferences, out Guid iid))
+ if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(
+ type: typeDefinition,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ iid: out Guid iid))
{
return null;
}
@@ -159,7 +167,11 @@ internal partial class SignatureGenerator
}
// Otherwise, get the IID from the type definition and use it
- if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(typeDefinition, interopReferences, out Guid iid))
+ if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(
+ type: typeDefinition,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ iid: out Guid iid))
{
return null;
}
@@ -176,7 +188,11 @@ internal partial class SignatureGenerator
private static string? Interface(TypeDefinition typeDefinition, InteropReferences interopReferences, bool useWindowsUIXamlProjections)
{
// For all interface types, we should always be able to resolve their IID
- if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(typeDefinition, interopReferences, out Guid iid))
+ if (!GuidGenerator.TryGetIIDFromWellKnownInterfaceIIDsOrAttribute(
+ type: typeDefinition,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ iid: out Guid iid))
{
return null;
}
@@ -206,7 +222,11 @@ internal partial class SignatureGenerator
}
// Get the IID for 'Nullable', which is the one we use for 'IReference'
- _ = WellKnownInterfaceIIDs.TryGetGUID(interopReferences.Nullable1, interopReferences, out Guid iid);
+ _ = WellKnownInterfaceIIDs.TryGetGUID(
+ interfaceType: interopReferences.Nullable1,
+ useWindowsUIXamlProjections: useWindowsUIXamlProjections,
+ interopReferences: interopReferences,
+ guid: out Guid iid);
// Construct the signature for the boxed delegate (the base type will be the possibly constructed delegate)
return $"pinterface({{{iid}}};{GetSignature(typeSignature.BaseType, interopReferences, useWindowsUIXamlProjections)})";
diff --git a/src/WinRT.Interop.Generator/Helpers/TypeMapping.cs b/src/WinRT.Interop.Generator/Helpers/TypeMapping.cs
index c4a3ba39d..deec11afb 100644
--- a/src/WinRT.Interop.Generator/Helpers/TypeMapping.cs
+++ b/src/WinRT.Interop.Generator/Helpers/TypeMapping.cs
@@ -51,6 +51,7 @@ private readonly record struct MappedType(
new("System.ComponentModel.PropertyChangedEventHandler", new("Microsoft.UI.Xaml.Data", "PropertyChangedEventHandler")),
new("System.Windows.Input.ICommand", new("Microsoft.UI.Xaml.Input", "ICommand")),
new("System.Collections.IEnumerable", new("Microsoft.UI.Xaml.Interop", "IBindableIterable")),
+ new("System.Collections.IEnumerator", new("Microsoft.UI.Xaml.Interop", "IBindableIterator")),
new("System.Collections.IList", new("Microsoft.UI.Xaml.Interop", "IBindableVector")),
new("System.Collections.Specialized.INotifyCollectionChanged", new("Microsoft.UI.Xaml.Interop", "INotifyCollectionChanged")),
new("System.Collections.Specialized.NotifyCollectionChangedAction", new("Microsoft.UI.Xaml.Interop", "NotifyCollectionChangedAction", "enum(Microsoft.UI.Xaml.Interop.NotifyCollectionChangedAction;i4)")),
@@ -94,6 +95,7 @@ private readonly record struct MappedType(
new("Microsoft.UI.Xaml.Interop.NotifyCollectionChangedAction", new("Windows.UI.Xaml.Interop", "NotifyCollectionChangedAction", "enum(Windows.UI.Xaml.Interop.NotifyCollectionChangedAction;i4)")),
new("Microsoft.UI.Xaml.Interop.INotifyCollectionChanged", new("Windows.UI.Xaml.Interop", "INotifyCollectionChanged")),
new("Microsoft.UI.Xaml.Interop.IBindableIterable", new("Windows.UI.Xaml.Interop", "IBindableIterable")),
+ new("Microsoft.UI.Xaml.Interop.IBindableIterator", new("Windows.UI.Xaml.Interop", "IBindableIterator")),
new("Microsoft.UI.Xaml.Interop.IBindableVector", new("Windows.UI.Xaml.Interop", "IBindableVector")),
new("Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventHandler", new("Windows.UI.Xaml.Interop", "NotifyCollectionChangedEventHandler")),
new("Microsoft.UI.Xaml.Input.ICommand", new("Windows.UI.Xaml.Input", "ICommand")),
diff --git a/src/WinRT.Interop.Generator/References/InteropReferences.cs b/src/WinRT.Interop.Generator/References/InteropReferences.cs
index 821893b33..348103964 100644
--- a/src/WinRT.Interop.Generator/References/InteropReferences.cs
+++ b/src/WinRT.Interop.Generator/References/InteropReferences.cs
@@ -251,7 +251,7 @@ public InteropReferences(
///
/// Gets the for .
///
- public TypeReference ICommand => field ??= _corLibTypeFactory.CorLibScope.CreateTypeReference("System.Windows.Input"u8, "ICommand"u8);
+ public TypeReference ICommand => field ??= SystemObjectModel.CreateTypeReference("System.Windows.Input"u8, "ICommand"u8);
///
/// Gets the for .
diff --git a/src/WinRT.Interop.Generator/References/WellKnownInterfaceIIDs.cs b/src/WinRT.Interop.Generator/References/WellKnownInterfaceIIDs.cs
index a040c1244..e95112ff3 100644
--- a/src/WinRT.Interop.Generator/References/WellKnownInterfaceIIDs.cs
+++ b/src/WinRT.Interop.Generator/References/WellKnownInterfaceIIDs.cs
@@ -67,7 +67,9 @@ internal static class WellKnownInterfaceIIDs
/// The for the get_IID_... method for .
///
///
- /// The types handled by this method should be kept in sync with .
+ /// The types handled by this method should be kept in sync with
+ /// and
+ /// .
///
public static MemberReference get_IID(
ITypeDescriptor interfaceType,
@@ -80,14 +82,26 @@ public static MemberReference get_IID(
// Shared types
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IDisposable)
=> "Windows_Foundation_IClosable",
- _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IServiceProvider)
- => "Microsoft_UI_Xaml_IXamlServiceProvider",
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IAsyncInfo)
=> "Windows_Foundation_IAsyncInfo",
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IAsyncAction)
=> "Windows_Foundation_IAsyncAction",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IVectorChangedEventArgs)
+ => "Windows_Foundation_Collections_IVectorChangedEventArgs",
// XAML types
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerable) && useWindowsUIXamlProjections
+ => "Windows_UI_Xaml_Interop_IBindableIterable",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerable)
+ => "Microsoft_UI_Xaml_Interop_IBindableIterable",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerator) && useWindowsUIXamlProjections
+ => "Windows_UI_Xaml_Interop_IBindableIterator",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerator)
+ => "Microsoft_UI_Xaml_Interop_IBindableIterator",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IList) && useWindowsUIXamlProjections
+ => "Windows_UI_Xaml_Interop_IBindableVector",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IList)
+ => "Microsoft_UI_Xaml_Interop_IBindableVector",
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyCollectionChanged) && useWindowsUIXamlProjections
=> "Windows_UI_Xaml_Interop_INotifyCollectionChanged",
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyCollectionChanged)
@@ -102,6 +116,8 @@ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.I
=> "Microsoft_UI_Xaml_Input_ICommand",
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyDataErrorInfo)
=> "Microsoft_UI_Xaml_Data_INotifyDataErrorInfo",
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IServiceProvider)
+ => "Microsoft_UI_Xaml_IXamlServiceProvider",
_ => throw WellKnownInteropExceptions.InvalidCustomMappedTypeForWellKnownInterfaceIIDs(interfaceType)
};
@@ -115,16 +131,21 @@ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.I
/// Attempts to resolve a well-known Windows Runtime interface GUID for the specified type signature.
///
/// The representing the managed type to inspect
+ /// Whether to use Windows.UI.Xaml projections.
/// The instance to use.
/// Out parameter for the resolved of the type.
/// true if a matching GUID was found; otherwise, false.
public static bool TryGetGUID(
ITypeDescriptor interfaceType,
+ bool useWindowsUIXamlProjections,
InteropReferences interopReferences,
out Guid guid)
{
guid = interfaceType switch
{
+ // Shared types
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IDisposable)
+ => new Guid("1BFCA4F6-2C4E-5174-9869-B39D35848FCC"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.EventHandler)
=> new Guid("9DE1C535-6AE1-11E0-84E1-18A905BCC53F"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.EventHandler1)
@@ -133,12 +154,8 @@ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.E
=> new Guid("9DE1C535-6AE1-11E0-84E1-18A905BCC53F"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.KeyValuePair2)
=> new Guid("02B51929-C1C4-4A7E-8940-0312B5C18500"),
- _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerable)
- => new Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerable1)
=> new Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3"),
- _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerator)
- => new Guid("6A79E863-4300-459A-9966-CBB660963EE1"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerator1)
=> new Guid("6A79E863-4300-459A-9966-CBB660963EE1"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.AsyncOperationWithProgressCompletedHandler2)
@@ -147,8 +164,6 @@ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.A
=> new Guid("9D534225-231F-55E7-A6D0-6C938E2D9160"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.MapChangedEventHandler2)
=> new Guid("19046F0B-CF81-5DEC-BBB2-7CC250DA8B8B"),
- _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IList)
- => new Guid("393DE7DE-6FD0-4C0D-BB71-47244A113E93"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IList1)
=> new Guid("0E3F106F-A266-50A1-8043-C90FCF3844F6"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IReadOnlyList1)
@@ -179,8 +194,28 @@ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.A
=> new Guid("C261D8D0-71BA-5F38-A239-872342253A18"),
_ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IVectorChangedEventArgs)
=> new Guid("575933DF-34FE-4480-AF15-07691F3D5D9B"),
- _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IDisposable)
- => new Guid("1BFCA4F6-2C4E-5174-9869-B39D35848FCC"),
+
+ // XAML types
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerable)
+ => new Guid("FAA585EA-6214-4217-AFDA-7F46DE5869B3"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IEnumerator)
+ => new Guid("6A79E863-4300-459A-9966-CBB660963EE1"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IList)
+ => new Guid("393DE7DE-6FD0-4C0D-BB71-47244A113E93"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyCollectionChanged) && useWindowsUIXamlProjections
+ => new Guid("28B167D5-1A31-465B-9B25-D5C3AE686C40"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyCollectionChanged)
+ => new Guid("530155E1-28A5-5693-87CE-30724D95A06D"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyPropertyChanged) && useWindowsUIXamlProjections
+ => new Guid("CF75D69C-F2F4-486B-B302-BB4C09BAEBFA"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyPropertyChanged)
+ => new Guid("90B17601-B065-586E-83D9-9ADC3A695284"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.ICommand)
+ => new Guid("E5AF3542-CA67-4081-995B-709DD13792DF"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.INotifyDataErrorInfo)
+ => new Guid("0EE6C2CC-273E-567D-BC0A-1DD87EE51EBA"),
+ _ when SignatureComparer.IgnoreVersion.Equals(interfaceType, interopReferences.IServiceProvider)
+ => new Guid("68B3A2DF-8173-539F-B524-C8A2348F5AFB"),
_ => Guid.Empty
};
diff --git a/src/WinRT.Runtime2/Windows.Foundation/Collections/IMapChangedEventArgs{K}.cs b/src/WinRT.Runtime2/Windows.Foundation/Collections/IMapChangedEventArgs{K}.cs
index 3fd530e26..10f8bad5d 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/Collections/IMapChangedEventArgs{K}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/Collections/IMapChangedEventArgs{K}.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -11,6 +12,7 @@ namespace Windows.Foundation.Collections;
///
/// The type of keys in the map.
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("9939F4DF-050A-4C0F-AA60-77075F9C4777")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IMapChangedEventArgs
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableMap{K, V}.cs b/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableMap{K, V}.cs
index 0ccb2c01b..921e0fd22 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableMap{K, V}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableMap{K, V}.cs
@@ -3,6 +3,7 @@
using System.Collections;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -14,6 +15,7 @@ namespace Windows.Foundation.Collections;
/// The type of keys in the observable map.
/// The type of values in the observable map.
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("65DF2BF5-BF39-41B5-AEBC-5A9D865E472B")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IObservableMap : IDictionary, ICollection>, IEnumerable>, IEnumerable
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableVector{T}.cs b/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableVector{T}.cs
index f82edbcbc..31df8a627 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableVector{T}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/Collections/IObservableVector{T}.cs
@@ -3,6 +3,7 @@
using System.Collections;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -13,6 +14,7 @@ namespace Windows.Foundation.Collections;
///
/// The type of elements in the observable vector.
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("5917EB53-50B4-4A0D-B309-65862B3F1DBC")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IObservableVector : IList, ICollection, IEnumerable, IEnumerable
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/Collections/IVectorChangedEventArgs.cs b/src/WinRT.Runtime2/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
index 239e48693..9f07ae237 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -10,6 +11,7 @@ namespace Windows.Foundation.Collections;
/// Provides data for the changed event of a vector.
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("575933DF-34FE-4480-AF15-07691F3D5D9B")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IVectorChangedEventArgs
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/IAsyncAction.cs b/src/WinRT.Runtime2/Windows.Foundation/IAsyncAction.cs
index b77cba5c1..3fac041f9 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/IAsyncAction.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/IAsyncAction.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -17,6 +18,7 @@ namespace Windows.Foundation;
///
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("5A648006-843A-4DA9-865B-9D26E5DFAD7B")]
[ContractVersion(typeof(FoundationContract), 65536u)]
[ABI.Windows.Foundation.IAsyncActionComWrappersMarshaller]
public interface IAsyncAction : IAsyncInfo
diff --git a/src/WinRT.Runtime2/Windows.Foundation/IAsyncActionWithProgress{TProgress}.cs b/src/WinRT.Runtime2/Windows.Foundation/IAsyncActionWithProgress{TProgress}.cs
index a5c066def..7c4c0a86d 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/IAsyncActionWithProgress{TProgress}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/IAsyncActionWithProgress{TProgress}.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -18,6 +19,7 @@ namespace Windows.Foundation;
///
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("1F6DB258-E803-48A1-9546-EB7353398884")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IAsyncActionWithProgress : IAsyncInfo
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/IAsyncInfo.cs b/src/WinRT.Runtime2/Windows.Foundation/IAsyncInfo.cs
index caea59409..5bb3b01a9 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/IAsyncInfo.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/IAsyncInfo.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System;
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -11,6 +12,7 @@ namespace Windows.Foundation;
/// Provides support for asynchronous operations.
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("00000036-0000-0000-C000-000000000046")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IAsyncInfo
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperationWithProgress{TResult, TProgress}.cs b/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperationWithProgress{TResult, TProgress}.cs
index 25fe3cfb8..99c857573 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperationWithProgress{TResult, TProgress}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperationWithProgress{TResult, TProgress}.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -20,6 +21,7 @@ namespace Windows.Foundation;
///
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("B5D036D7-E297-498F-BA60-0289E76E23DD")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IAsyncOperationWithProgress : IAsyncInfo
{
diff --git a/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperation{TResult}.cs b/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperation{TResult}.cs
index 104f4e6e9..a6ec54b5f 100644
--- a/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperation{TResult}.cs
+++ b/src/WinRT.Runtime2/Windows.Foundation/IAsyncOperation{TResult}.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+using System.Runtime.InteropServices;
using Windows.Foundation.Metadata;
using WindowsRuntime;
@@ -18,6 +19,7 @@ namespace Windows.Foundation;
///
///
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
+[Guid("9FC2B0BB-E446-44E2-AA61-9CAB8F636AF2")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public interface IAsyncOperation : IAsyncInfo
{