diff --git a/build/AzurePipelineTemplates/CsWinRT-Variables.yml b/build/AzurePipelineTemplates/CsWinRT-Variables.yml index c64a14f2d..4d0ae9e39 100644 --- a/build/AzurePipelineTemplates/CsWinRT-Variables.yml +++ b/build/AzurePipelineTemplates/CsWinRT-Variables.yml @@ -3,11 +3,11 @@ variables: - name: MajorVersion value: 2 - name: MinorVersion - value: 1 + value: 2 - name: PatchVersion - value: 7 + value: 0 - name: WinRT.Runtime.AssemblyVersion - value: '2.1.0.0' + value: '2.2.0.0' - name: Net5.SDK.Feed value: 'https://dotnetcli.blob.core.windows.net/dotnet' - name: Net6.SDK.Version diff --git a/docs/aot-trimming.md b/docs/aot-trimming.md index 90169df43..d039ec224 100644 --- a/docs/aot-trimming.md +++ b/docs/aot-trimming.md @@ -2,17 +2,30 @@ ## Overview -As of CsWinRT **2.1.1** and Windows SDK projection 10.0..**38**, generated projections are AOT compatible and various trimming issues have been addressed as part of it. This Windows SDK projection version is included in the .NET SDK starting from the following versions: 6.0.134, 6.0.426, 8.0.109, 8.0.305 or 8.0.402. +As of CsWinRT **2.1.1** and Windows SDK projection 10.0..**38**, generated projections are AOT compatible and various trimming issues have been addressed as part of it. This Windows SDK projection version is included in the .NET SDK starting from the following versions: 6.0.134, 6.0.426, 8.0.109, 8.0.305 or 8.0.403. The `OptIn` mode of this support discussed in this document is added in CsWinRT **2.2.0** and is added for .NET 8 and later consumers. -Until these versions are available, you can use the updated Windows SDK projection by specifying the [WindowsSdkPackageVersion property](https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#windowssdkpackageversion) and by adding the `Microsoft.Windows.CsWinRT` package reference to enable the source generator used to make WinRT scenarios trimming and AOT compatible. Once you moved to one of the .NET SDK versions that come with it by default, you can remove the `WindowsSdkPackageVersion` property and also the `Microsoft.Windows.CsWinRT` package reference if you added it for the source generator. +Projections can choose to mark their projects as [IsAotCompatible](https://learn.microsoft.com/dotnet/core/deploying/native-aot/?tabs=net8plus%2Cwindows#aot-compatibility-analyzers) to run the relevant .NET AOT analyzers on them. Similarly, C# libraries using C#/WinRT authoring support with the new version can also be AOT compatible and can be published for AOT using the [PublishAOT property and running publish](https://learn.microsoft.com/dotnet/core/deploying/native-aot/?tabs=net8plus%2Cwindows#publish-native-aot-using-the-cli). -Projections can choose to mark their projects as [IsAotCompatible](https://learn.microsoft.com/dotnet/core/deploying/native-aot/?tabs=net8plus%2Cwindows#aot-compatibility-analyzers) to run the relevant .NET AOT analyzers on them. Similarly, C# libraries using C#/WinRT authoring support with the new version are also AOT compatible and can be published for AOT using the [PublishAOT property and running publish](https://learn.microsoft.com/dotnet/core/deploying/native-aot/?tabs=net8plus%2Cwindows#publish-native-aot-using-the-cli). +## Source generator modes + +CsWinRT makes use of a source generator as part of making generated projections and uses of it trimming and AOT compatible. The source generator is primarily used to generate vtables for classes defined by the project and for generic types used such that if they were passed across the WinRT ABI, the interfaces that they implement will be projected into WinRT. CsWinRT still has its existing reflection based approach which still works for non AOT and non trimming scenarios but also comes at a runtime cost. There are four different modes which the source generator can run in which is determined by `CsWinRTAotOptimizerEnabled`: + +| Mode | Meaning | +| ----- | ------- | +| OptIn | Only generates code for attributed types. | +| Auto | Attempts to detect scenarios that implement interfaces that can be passed across the WinRT ABI boundary and generates code for them. | +| True* | If running in a project that references WinUI / UWP, then runs in `Auto`. Otherwise runs in `OptIn`. | +| False | Disables any generation of code and the analyzer. | + +In the default mode of `True`, the source generator looks at the type of project to determine whether it runs in `Auto` or `OptIn` mode. For WinUI / UWP projects, it runs in `Auto` mode given they frequently pass things across the WinRT boundary. This is to avoid having to mark every class with the attribute and to avoid listing every generic type used. Eventually the plan is to have the source generator in these scenarios to run as a build task. For projects which have explictly set `CsWinRTAotWarningLevel` to `2`, it also runs in `Auto` mode given the project had explicitly opted in to warnings for scenarios involving built-in interfaces and we want to avoid the changing the current behavior for such projects. These projects can manually still set to `OptIn` if that is what they desire. For all other projects, the source generator runs in `OptIn` mode where when it sees one of the generator attributes used, it will generate code for it to make it trimming and AOT compatible. + +The `OptIn` mode attributes still does work in `Auto` mode to allow to use in scenarios where the source generator didn't detect a certain scenario. ## Consuming projected types and being trimming and AOT compatible -If your app or library has non-WinRT classes that implement C#/WinRT projected interfaces or implement WinRT mapped built-in .NET interfaces and are passed across the ABI to other WinRT functions, the class needs to be marked `partial`. Marking it `partial` allows the source generator distributed with C#/WinRT to add an attribute to the class which has the necessary logic to produce the WinRT vtable for it in a way that is both trimming and AOT compatible. +If your app or library has non-WinRT classes that implement C#/WinRT projected interfaces, extend C#/WinRT projected classes, or implement WinRT mapped built-in .NET interfaces and are passed across the ABI to other WinRT functions, the class needs to be marked `partial` and if using `OptIn` mode also needs to be have the `WinRT.GeneratedWinRTExposedType` attribute. This enables the source generator distributed with C#/WinRT to add an attribute to the class with the WinRT vtable for it such that it can be looked up later in a way that is both trimming and AOT compatible. -To help with this, there is a `code fixer` that will produce diagnostics when such types are not marked `partial`. The severity and scope of the diagnostics are determined by `CsWinRTAotWarningLevel`: +To help with this, there is a `code fixer` that will produce diagnostics when such types are not marked `partial`. This is helpful in `Auto` mode but will also produce diagnostics for types in `OptIn` mode that have the `WinRT.GeneratedWinRTExposedType` attribute but aren't marked `partial`. The severity and scope of the diagnostics are determined by `CsWinRTAotWarningLevel`: | Level | Meaning | | ----- | ------- | @@ -20,23 +33,23 @@ To help with this, there is a `code fixer` that will produce diagnostics when su | 1 | Warnings for types not marked partial that implement C#/WinRT projected interfaces. | | 2 | Warnings from level 1 plus warnings for types not marked partial that implement WinRT mapped built-in .NET interfaces. | -It is recommended to set the `CsWinRTAotWarningLevel` to 2 and go through all the warnings and mark such types `partial` or suppress the warning if those types are not passed across the WinRT ABI. By default, if you reference the CsWinRT package, the `CsWinRTAotWarningLevel` is set to 1. If you don't have a CsWinRT package reference, then the .NET default is to set `CsWinRTAotWarningLevel` to 1 if you have marked your binary as AOT compatible either by using `IsAotCompatible` or `PublishAot`. Even though it is only by default enabled as warnings for AOT scenarios, you should manually set it to 1 or 2 if you support trimming and address them. +In `Auto` mode, it is recommended to set the `CsWinRTAotWarningLevel` to 2 and go through all the warnings and mark such types `partial` or suppress the warning if those types are not passed across the WinRT ABI. By default, if you reference the CsWinRT package, the `CsWinRTAotWarningLevel` is set to 1. If you don't have a CsWinRT package reference, then the .NET default is to set `CsWinRTAotWarningLevel` to 1 if you have marked your binary as AOT compatible either by using `IsAotCompatible` or `PublishAot`. Even though it is only by default enabled as warnings for AOT scenarios, you should manually set it to 1 or 2 if you support trimming and address them. -The source generator also detects other scenarios such as boxing of arrays and instantiations of generic WinRT types for which it generates code that will allow the WinRT vtable for it to be looked up when passed across the WinRT ABI. +In `Auto` mode, the source generator also detects other scenarios such as boxing of arrays and instantiations of generic WinRT types for which it generates code that will allow the WinRT vtable for it to be looked up when passed across the WinRT ABI. In `OptIn` mode, for such types (boxed arrays, generic types) that are passed across the WinRT boundary, an assembly attribute `WinRT.GeneratedWinRTExposedExternalType`, can be placed in the project for each type to have the same code generated for it. This will also typically require `AllowUnsafeBlocks` to be enabled for your project as the generated code does make use of unsafe blocks. In general, this also means that if your app or library has a dependency on another library that uses or returns types falling into one of those above scenarios, that library needs to have also been ran with the updated CsWinRT version for your app or library to be AOT compatible. This is similar to the general .NET requirement where all your dependencies need to be AOT compatible for your app or library to be AOT compatible. ## ICustomPropertyProvider type support on AOT (WinUI binding) -Non source generated WinUI binding scenarios (i.e not `x:bind`) such as `DisplayMemberPath` make use of `ICustomPropertyProvider`. The implementation for this was reflection based and therby not AOT safe. CsWinRT provides an AOT safe implementation for this support. To make use of this, any classes which are provided as the source for such scenarios should be made `partial` and marked with the `GeneratedBindableCustomProperty` attribute to make the CsWinRT source generator aware that this type is used in such scenarios and it should generate the AOT safe implementation for it. By default, with the empty constructor, the generated implementation will support all public properties. You are able to scope down the supported public properties by manually specfying the property names and indexer types in the constructor. For example: `[GeneratedBindableCustomProperty([nameof(Name), nameof(Value)], [typeof(int)])]`. To help determine the impacted scenarios, we added an exception that gets thrown when you rely on the non AOT safe version of this feature while `PublishAot` is set. +Non source generated WinUI and UWP XAML binding scenarios (i.e not `x:Bind`) such as `DisplayMemberPath` make use of `ICustomPropertyProvider`. The implementation for this was reflection based and therby not AOT safe. CsWinRT provides an AOT safe implementation for this support. To make use of this, any classes which are provided as the source for such scenarios should be made `partial` and marked with the `WinRT.GeneratedBindableCustomProperty` attribute to make the CsWinRT source generator aware that this type is used in such scenarios and it should generate the AOT safe implementation for it. By default, with the empty constructor, the generated implementation will support all public properties. You are able to scope down the supported public properties by manually specfying the property names and indexer types in the constructor. For example: `[GeneratedBindableCustomProperty([nameof(Name), nameof(Value)], [typeof(int)])]`. To help determine the impacted scenarios, we added an exception that gets thrown when you rely on the non AOT safe version of this feature while `PublishAot` is set. ## Known issues when publishing for AOT There are a couple issues related to our AOT support that are known with the current release which will be addressed in future updates or be fixed in .NET: -1. If any built-in .NET `private` types implementing mapped WinRT interfaces are passed across the WinRT ABI, they will not be detected by the source generator and thereby not be AOT compatible. You can workaround this by either avoiding directly passing them across the ABI by wrapping them or by registering your own WinRT vtable lookup function using `WinRT.ComWrappersSupport.RegisterTypeComInterfaceEntriesLookup` and `WinRT.ComWrappersSupport.RegisterTypeRuntimeClassNameLookup`. An example of this can be seen [here](https://github.com/manodasanW/WinUI-Gallery/blob/16ed717700b929dcb6591d32a4f10cd8b102aa07/WinUIGallery/VtableInitialization.cs#L57-L75) and [here](https://github.com/manodasanW/WinUI-Gallery/blob/16ed717700b929dcb6591d32a4f10cd8b102aa07/WinUIGallery/VtableInitialization.cs#L87-L90). +1. Collection expressions can not be passed across the WinRT ABI boundary. -2. In WinUI apps, you might run into a race condition which triggers a hang during .NET GC needing to restart the app. This is the result of an exception being thrown unexpectedly during GC due to an invalid handle. +2. In WinUI apps, you might run into a race condition which triggers a hang during .NET GC needing to restart the app. This is the result of an exception being thrown unexpectedly during GC due to an invalid handle. This is fixed as of .NET 9 RC2. ## Known issues when publishing for JIT @@ -44,14 +57,3 @@ There are a couple issues related to our AOT support that are known with the cur ## Known issues in general -1. When the source generator runs, it may produce code that makes use of `unsafe` depending on scenario. If you do not already have the property `AllowUnsafeBlocks` set to `true`, you will see `error CS0227: Unsafe code may only appear if compiling with /unsafe`. To address this, you should set the property `AllowUnsafeBlocks` to `true`. In future builds, we will instead look at producing a diagnostic for this rather than resulting in a compiler error. - -2. In WPF scenarios where you are not building a projection, you may see duplicate type errors where the same generated types are getting generated twice. This is due to a WPF targets issue where the same source generator is ran twice due to the file conflict of it being in multiple packages not being resolved. We are investigating addressing this, but in the mean time, you can workaround it by adding a target similar to the below: - -``` - - - - - -``` \ No newline at end of file diff --git a/nuget/Microsoft.Windows.CsWinRT.targets b/nuget/Microsoft.Windows.CsWinRT.targets index 808a27f04..876338f3c 100644 --- a/nuget/Microsoft.Windows.CsWinRT.targets +++ b/nuget/Microsoft.Windows.CsWinRT.targets @@ -19,7 +19,6 @@ Copyright (C) Microsoft Corporation. All rights reserved. ResolveAssemblyReferences;CsWinRTIncludeProjection;CsWinRTRemoveWinMDReferences;$(CoreCompileDependsOn) false true - false True + Auto diff --git a/src/Tests/DiagnosticTests/DiagnosticTests.csproj b/src/Tests/DiagnosticTests/DiagnosticTests.csproj index 21d860027..55a15523b 100644 --- a/src/Tests/DiagnosticTests/DiagnosticTests.csproj +++ b/src/Tests/DiagnosticTests/DiagnosticTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj b/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj new file mode 100644 index 000000000..51bed49b8 --- /dev/null +++ b/src/Tests/FunctionalTests/OptInMode/OptInMode.csproj @@ -0,0 +1,18 @@ + + + + Exe + net8.0 + x86;x64 + win-x86;win-x64 + $(MSBuildProjectDirectory)\..\PublishProfiles\win10-$(Platform).pubxml + OptIn + + + + + + + + + diff --git a/src/Tests/FunctionalTests/OptInMode/Program.cs b/src/Tests/FunctionalTests/OptInMode/Program.cs new file mode 100644 index 000000000..d8aa3c8c5 --- /dev/null +++ b/src/Tests/FunctionalTests/OptInMode/Program.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Windows.Input; +using TestComponentCSharp; +using Windows.Foundation; +using Windows.Web.Http; +using WinRT; +using WinRT.Interop; + +[assembly: WinRT.GeneratedWinRTExposedExternalType(typeof(int[]))] +[assembly: GeneratedWinRTExposedExternalType(typeof(Dictionary))] +[assembly: GeneratedWinRTExposedExternalTypeAttribute(typeof(AsyncActionProgressHandler))] + +Class instance = new Class(); +var expected = new int[] { 0, 1, 2 }; +instance.BindableIterableProperty = expected; +if (expected != instance.BindableIterableProperty) +{ + return 101; +} + +var expected2 = new double[] { 0, 1, 2 }; +try +{ + instance.BindableIterableProperty = expected2; + // Shouldn't reach here as we didn't opt-in double[]. + return 101; +} +catch (Exception) +{ +} + +var cancellationDictionary = new Dictionary(); +instance.BindableIterableProperty = cancellationDictionary; +if (cancellationDictionary != instance.BindableIterableProperty) +{ + return 101; +} + +var customCommand = new CustomCommand() as ICommand; +var ccw = MarshalInspectable.CreateMarshaler(customCommand); +ccw.TryAs(ABI.System.Windows.Input.ICommandMethods.IID, out var commandCCW); +if (commandCCW == null) +{ + return 101; +} + +// Didn't opt-in +var customCommand2 = new CustomCommand2() as ICommand; +ccw = MarshalInspectable.CreateMarshaler(customCommand2); +ccw.TryAs(ABI.System.Windows.Input.ICommandMethods.IID, out commandCCW); +if (commandCCW != null) +{ + return 101; +} + +instance.IntProperty = 12; +var async_get_int = instance.GetIntAsync(); +int async_int = 0; +async_get_int.Completed = (info, status) => async_int = info.GetResults(); +async_get_int.GetResults(); +if (async_int != 12) +{ + return 101; +} + +bool progressCalledWithExpectedResults = false; +var asyncProgressHandler = new AsyncActionProgressHandler((info, progress) => +{ + if (progress.BytesReceived == 3 && progress.TotalBytesToReceive == 4) + { + progressCalledWithExpectedResults = true; + } +}); +Class.UnboxAndCallProgressHandler(asyncProgressHandler); +if (!progressCalledWithExpectedResults) +{ + return 101; +} + +// Ensure we can use the IProperties interface from the native side. +var managedProperties = new ManagedProperties(42); +instance.CopyProperties(managedProperties); +if (managedProperties.ReadWriteProperty != instance.ReadWriteProperty) +{ + return 101; +} + +return 100; + +[GeneratedWinRTExposedType] +sealed partial class CustomCommand : ICommand +{ + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + throw new NotImplementedException(); + } + + public void Execute(object parameter) + { + throw new NotImplementedException(); + } +} + +sealed partial class CustomCommand2 : ICommand +{ + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + throw new NotImplementedException(); + } + + public void Execute(object parameter) + { + throw new NotImplementedException(); + } +} + +[global::WinRT.GeneratedWinRTExposedTypeAttribute] +sealed partial class ManagedProperties : IProperties1, IUriHandler +{ + private readonly int _value; + + public ManagedProperties(int value) + { + _value = value; + } + + public int ReadWriteProperty => _value; + + public void AddUriHandler(ProvideUri provideUri) + { + _ = provideUri(); + } + + void IUriHandler.AddUriHandler(ProvideUri provideUri) => AddUriHandler(provideUri); +} diff --git a/src/WinRT.Runtime/ApiCompatBaseline.net6.0.txt b/src/WinRT.Runtime/ApiCompatBaseline.net6.0.txt new file mode 100644 index 000000000..2416024d1 --- /dev/null +++ b/src/WinRT.Runtime/ApiCompatBaseline.net6.0.txt @@ -0,0 +1,2 @@ +Compat issues with assembly WinRT.Runtime: +Total Issues: 0 diff --git a/src/WinRT.Runtime/ApiCompatBaseline.net8.0.txt b/src/WinRT.Runtime/ApiCompatBaseline.net8.0.txt new file mode 100644 index 000000000..eabed9ad3 --- /dev/null +++ b/src/WinRT.Runtime/ApiCompatBaseline.net8.0.txt @@ -0,0 +1,3 @@ +Compat issues with assembly WinRT.Runtime: +CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'WinRT.GeneratedBindableCustomPropertyAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation. +Total Issues: 1 diff --git a/src/WinRT.Runtime/ApiCompatBaseline.txt b/src/WinRT.Runtime/ApiCompatBaseline.txt deleted file mode 100644 index ab0fdff57..000000000 --- a/src/WinRT.Runtime/ApiCompatBaseline.txt +++ /dev/null @@ -1,46 +0,0 @@ -Compat issues with assembly WinRT.Runtime: -TypesMustExist : Type 'ABI.System.IDisposable' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'ABI.System.Collections.Generic.IEnumerator' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'ABI.System.Windows.Input.ICommand' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected WinRT.ObjectReference.Vftbl> WinRT.ObjectReference.Vftbl> ABI.System.Collections.Generic.KeyValuePair._obj' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.KeyValuePair..ctor(WinRT.ObjectReference.Vftbl>)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public ABI.System.Collections.Generic.KeyValuePair ABI.System.Collections.Generic.KeyValuePair.op_Implicit(WinRT.ObjectReference.Vftbl>)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.ObjectReference.Vftbl> ABI.System.Collections.Generic.KeyValuePair._FromAbi(System.IntPtr)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public System.Delegate System.Delegate ABI.System.Collections.Generic.KeyValuePair.Vftbl.get_Key_0' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public System.Delegate System.Delegate ABI.System.Collections.Generic.KeyValuePair.Vftbl.get_Value_1' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'ABI.System.Collections.Specialized.INotifyCollectionChanged' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'ABI.System.ComponentModel.INotifyDataErrorInfo' does not exist in the implementation but it does exist in the contract. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' exists on 'System.Type WinRT.Marshaler.AbiType' in the contract but not the implementation. -CannotMakeMemberNonVirtual : Member 'public System.Int32 WinRT.IObjectReference.TryAs(System.Guid, WinRT.ObjectReference)' is non-virtual in the implementation but is virtual in the contract. -MembersMustExist : Member 'protected System.Boolean System.Boolean WinRT.IObjectReference.disposed' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected void WinRT.IObjectReference.Dispose(System.Boolean)' does not exist in the implementation but it does exist in the contract. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' on 'ABI.System.Type.FromAbi(ABI.System.Type)' changed from '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the contract to '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2057", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterCustomAbiTypeMapping(System.Type, System.Type, System.String, System.Boolean)' does not exist in the implementation but it does exist in the contract. -CannotRemoveAttribute : Attribute 'WinRT.ObjectReferenceWrapperAttribute' exists on 'ABI.System.Nullable' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'WinRT.ObjectReferenceWrapperAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'WinRT.ObjectReferenceWrapperAttribute' exists on 'WinRT.IInspectable' in the contract but not the implementation. -MembersMustExist : Member 'protected void Microsoft.UI.Xaml.LayoutCycleException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected void Microsoft.UI.Xaml.Automation.ElementNotAvailableException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' on 'WinRT.WindowsRuntimeHelperTypeAttribute.HelperType' changed from '[DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.PublicNestedTypes)]' in the contract to '[DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicMethods)]' in the implementation. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' on 'ABI.System.Type.FromAbi(ABI.System.Type)' changed from '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the contract to '[UnconditionalSuppressMessageAttribute("Trimming", "IL2057", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the implementation. -InterfacesShouldHaveSameMembers : Default interface member 'public WinRT.IObjectReference WinRT.IWinRTObject.GetObjectReferenceForTypeFallback(System.RuntimeTypeHandle)' is present in the contract but not in the implementation. -MembersMustExist : Member 'public WinRT.IObjectReference WinRT.IWinRTObject.GetObjectReferenceForTypeFallback(System.RuntimeTypeHandle)' does not exist in the implementation but it does exist in the contract. -InterfacesShouldHaveSameMembers : Default interface member 'public System.Object WinRT.IWinRTObject.GetOrCreateTypeHelperData(System.RuntimeTypeHandle, System.Func)' is present in the contract but not in the implementation. -MembersMustExist : Member 'public System.Object WinRT.IWinRTObject.GetOrCreateTypeHelperData(System.RuntimeTypeHandle, System.Func)' does not exist in the implementation but it does exist in the contract. -InterfacesShouldHaveSameMembers : Default interface member 'public System.Boolean WinRT.IWinRTObject.IsInterfaceImplementedFallback(System.RuntimeTypeHandle, System.Boolean)' is present in the contract but not in the implementation. -MembersMustExist : Member 'public System.Boolean WinRT.IWinRTObject.IsInterfaceImplementedFallback(System.RuntimeTypeHandle, System.Boolean)' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'WinRT.SingleInterfaceOptimizedObject' is actually (has the sealed modifier) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'public A ABI.System.Nullable.As()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.ObjectReference ABI.System.Nullable.AsInterface()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public A ABI.System.Collections.Generic.KeyValuePair.As()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.ObjectReference ABI.System.Collections.Generic.KeyValuePair.AsInterface()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public A ABI.WinRT.Interop.IActivationFactory.As()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.ObjectReference ABI.WinRT.Interop.IActivationFactory.AsInterface()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected WinRT.ObjectReference WinRT.ObjectReference ABI.WinRT.Interop.IActivationFactory._obj' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public ABI.System.Nullable ABI.System.Nullable.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public ABI.System.Nullable ABI.System.Nullable.op_Implicit(WinRT.ObjectReference.Vftbl>)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public ABI.System.Collections.Generic.KeyValuePair ABI.System.Collections.Generic.KeyValuePair.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public ABI.WinRT.Interop.IActivationFactory ABI.WinRT.Interop.IActivationFactory.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.IInspectable WinRT.IInspectable.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public WinRT.IInspectable WinRT.IInspectable.op_Implicit(WinRT.ObjectReference)' does not exist in the implementation but it does exist in the contract. -Total Issues: 44 diff --git a/src/WinRT.Runtime/Attributes.cs b/src/WinRT.Runtime/Attributes.cs index 292cd67a5..a4f5b91b3 100644 --- a/src/WinRT.Runtime/Attributes.cs +++ b/src/WinRT.Runtime/Attributes.cs @@ -237,7 +237,11 @@ public WinRTAssemblyExportsTypeAttribute(Type type) /// /// This type also provides equivalent support for the UWP XAML interface (as it shares the same IID as the WinUI type). /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)] +#if NET8_0_OR_GREATER + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)] +#else + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] +#endif #if EMBED internal #else @@ -266,6 +270,53 @@ public GeneratedBindableCustomPropertyAttribute(string[] propertyNames, Type[] i internal string[] PropertyNames { get; } internal Type[] IndexerPropertyTypes { get; } } +#endif + +#if NET8_0_OR_GREATER + /// + /// An attribute used to indicate that the type definition it is put on + /// is exposed to the WinRT ABI and needs a vtable generated for it. + /// The type which this attribute is placed on also needs to be marked partial. + /// + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] +#if EMBED + internal +#else + public +#endif + sealed class GeneratedWinRTExposedTypeAttribute : Attribute + { + /// + /// Marks the type it is put on as exposed to the WinRT ABI + /// so that a vtable can be generated for it. + /// + public GeneratedWinRTExposedTypeAttribute() + { + } + } + + /// + /// An attribute used to indicate that the the type passed to the constructor + /// is exposed to the WinRT ABI and needs a vtable generated for it. + /// + [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = true)] +#if EMBED + internal +#else + public +#endif + sealed class GeneratedWinRTExposedExternalTypeAttribute : Attribute + { + /// + /// Marks the given type as exposed to the WinRT ABI so that a vtable can be generated for it. + /// + public GeneratedWinRTExposedExternalTypeAttribute(Type type) + { + Type = type; + } + + internal Type Type { get; } + } #endif } diff --git a/src/WinRT.Runtime/ComWrappersSupport.net5.cs b/src/WinRT.Runtime/ComWrappersSupport.net5.cs index e4b93bb3c..018c10936 100644 --- a/src/WinRT.Runtime/ComWrappersSupport.net5.cs +++ b/src/WinRT.Runtime/ComWrappersSupport.net5.cs @@ -173,15 +173,29 @@ public static IObjectReference CreateCCWForObject(object obj) internal static IntPtr CreateCCWForObjectForABI(object obj, Guid iid) { IntPtr ccw = ComWrappers.GetOrCreateComInterfaceForObject(obj, CreateComInterfaceFlags.TrackerSupport); - try - { - Marshal.ThrowExceptionForHR(Marshal.QueryInterface(ccw, ref iid, out var iidCcw)); - return iidCcw; - } - finally + + int hr = Marshal.QueryInterface(ccw, ref iid, out var iidCcw); + + Marshal.Release(ccw); + + if (hr < 0) { - MarshalInspectable.DisposeAbi(ccw); + [MethodImpl(MethodImplOptions.NoInlining)] + static void ThrowException(object obj, Guid iid, int hr) + { + // Special case 'E_NOINTERFACE' to provide a better exception message + if (hr == ExceptionHelpers.E_NOINTERFACE) + { + throw new InvalidCastException($"Failed to create a CCW for object of type '{obj.GetType()}' for interface with IID '{iid.ToString().ToUpperInvariant()}': the specified cast is not valid."); + } + + ExceptionHelpers.ThrowExceptionForHR(hr); + } + + ThrowException(obj, iid, hr); } + + return iidCcw; } public static unsafe T FindObject(IntPtr ptr) diff --git a/src/WinRT.Runtime/ExceptionHelpers.cs b/src/WinRT.Runtime/ExceptionHelpers.cs index 6469c7534..52356fdd7 100644 --- a/src/WinRT.Runtime/ExceptionHelpers.cs +++ b/src/WinRT.Runtime/ExceptionHelpers.cs @@ -41,7 +41,7 @@ static unsafe class ExceptionHelpers private const int E_NOTIMPL = unchecked((int)0x80004001); private const int E_ACCESSDENIED = unchecked((int)0x80070005); internal const int E_INVALIDARG = unchecked((int)0x80070057); - private const int E_NOINTERFACE = unchecked((int)0x80004002); + internal const int E_NOINTERFACE = unchecked((int)0x80004002); private const int E_OUTOFMEMORY = unchecked((int)0x8007000e); private const int ERROR_ARITHMETIC_OVERFLOW = unchecked((int)0x80070216); private const int ERROR_FILENAME_EXCED_RANGE = unchecked((int)0x800700ce); diff --git a/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net6.0.txt b/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net6.0.txt new file mode 100644 index 000000000..2416024d1 --- /dev/null +++ b/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net6.0.txt @@ -0,0 +1,2 @@ +Compat issues with assembly WinRT.Runtime: +Total Issues: 0 diff --git a/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net8.0.txt b/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net8.0.txt new file mode 100644 index 000000000..35cc316aa --- /dev/null +++ b/src/WinRT.Runtime/MatchingRefApiCompatBaseline.net8.0.txt @@ -0,0 +1,5 @@ +Compat issues with assembly WinRT.Runtime: +TypesMustExist : Type 'WinRT.GeneratedWinRTExposedExternalTypeAttribute' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'WinRT.GeneratedWinRTExposedTypeAttribute' does not exist in the reference but it does exist in the implementation. +CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'WinRT.GeneratedBindableCustomPropertyAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation to '[AttributeUsageAttribute(AttributeTargets.Class, Inherited=false, AllowMultiple=false)]' in the reference. +Total Issues: 3 diff --git a/src/WinRT.Runtime/MatchingRefApiCompatBaseline.txt b/src/WinRT.Runtime/MatchingRefApiCompatBaseline.txt deleted file mode 100644 index a226bc617..000000000 --- a/src/WinRT.Runtime/MatchingRefApiCompatBaseline.txt +++ /dev/null @@ -1,280 +0,0 @@ -Compat issues with assembly WinRT.Runtime: -MembersMustExist : Member 'public void ABI.System.EventHandler.CopyAbiArray(System.EventHandler[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper>.MarshalerArray ABI.System.EventHandler.CreateMarshalerArray(System.EventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.EventHandler.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.EventHandler.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper>.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.EventHandler[] ABI.System.EventHandler.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.EventHandler.FromManagedArray(System.EventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.EventHandler.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.EventHandlerMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.IDisposableMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.IServiceProviderMethods' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.System.Nullable.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.System.Nullable.As()' in the implementation but not the reference. -MembersMustExist : Member 'public T ABI.System.Nullable.GetValue(WinRT.IInspectable)' does not exist in the reference but it does exist in the implementation. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' on 'ABI.System.Type.FromAbi(ABI.System.Type)' changed from '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2057", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the implementation to '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the reference. -MembersMustExist : Member 'public void ABI.System.Uri.CopyAbiArray(System.Uri[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.Uri.CreateMarshalerArray(System.Uri[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Uri.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Uri[] ABI.System.Uri.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Uri.FromManagedArray(System.Uri[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Uri.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.IEnumerableMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.IListMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr ABI.System.Collections.Generic.IDictionaryMethods.AbiToProjectionVftablePtr.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IDictionaryMethods.Abi_Clear_6(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Collections.Generic.IReadOnlyDictionary ABI.System.Collections.Generic.IDictionaryMethods.Abi_GetView_3(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IDictionaryMethods.Abi_get_Size_1(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean ABI.System.Collections.Generic.IDictionaryMethods.Abi_HasKey_2(System.IntPtr, K)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean ABI.System.Collections.Generic.IDictionaryMethods.Abi_Insert_4(System.IntPtr, K, V)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public V ABI.System.Collections.Generic.IDictionaryMethods.Abi_Lookup_0(System.IntPtr, K)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IDictionaryMethods.Abi_Remove_5(System.IntPtr, K)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Generic.IDictionaryMethods.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IDictionaryMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr ABI.System.Collections.Generic.IEnumerableMethods.AbiToProjectionVftablePtr.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Collections.Generic.IEnumerator ABI.System.Collections.Generic.IEnumerableMethods.Abi_First_0(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Generic.IEnumerableMethods.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IEnumerableMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IEnumeratorMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IEnumeratorMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr ABI.System.Collections.Generic.IListMethods.AbiToProjectionVftablePtr.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_Append_7(System.IntPtr, T)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_Clear_9(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public T ABI.System.Collections.Generic.IListMethods.Abi_GetAt_0(System.IntPtr, System.UInt32)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IListMethods.Abi_GetMany_10(System.IntPtr, System.UInt32, T[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Collections.Generic.IReadOnlyList ABI.System.Collections.Generic.IListMethods.Abi_GetView_2(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IListMethods.Abi_get_Size_1(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean ABI.System.Collections.Generic.IListMethods.Abi_IndexOf_3(System.IntPtr, T, System.UInt32)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_InsertAt_5(System.IntPtr, System.UInt32, T)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_RemoveAtEnd_8(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_RemoveAt_6(System.IntPtr, System.UInt32)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_ReplaceAll_11(System.IntPtr, T[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IListMethods.Abi_SetAt_4(System.IntPtr, System.UInt32, T)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Generic.IListMethods.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IListMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.AbiToProjectionVftablePtr.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.Abi_get_Size_1(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.Abi_HasKey_2(System.IntPtr, K)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public V ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.Abi_Lookup_0(System.IntPtr, K)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.Abi_Split_3(System.IntPtr, System.IntPtr, System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Generic.IReadOnlyDictionaryMethods.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IReadOnlyDictionaryMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr ABI.System.Collections.Generic.IReadOnlyListMethods.AbiToProjectionVftablePtr.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public T ABI.System.Collections.Generic.IReadOnlyListMethods.Abi_GetAt_0(System.IntPtr, System.UInt32)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IReadOnlyListMethods.Abi_GetMany_3(System.IntPtr, System.UInt32, T[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.UInt32 ABI.System.Collections.Generic.IReadOnlyListMethods.Abi_get_Size_1(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean ABI.System.Collections.Generic.IReadOnlyListMethods.Abi_IndexOf_2(System.IntPtr, T, System.UInt32)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Generic.IReadOnlyListMethods.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.IReadOnlyListMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.IntPtr System.IntPtr ABI.System.Collections.Generic.KeyValuePair.AbiToProjectionVftablePtr' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'protected WinRT.ObjectReference WinRT.ObjectReference ABI.System.Collections.Generic.KeyValuePair._obj' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.KeyValuePair..ctor(WinRT.ObjectReference)' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.System.Collections.Generic.KeyValuePair.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.System.Collections.Generic.KeyValuePair.As()' in the implementation but not the reference. -MembersMustExist : Member 'public void ABI.System.Collections.Generic.KeyValuePair.CopyAbiArray(System.Collections.Generic.KeyValuePair[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public ABI.System.Collections.Generic.KeyValuePair ABI.System.Collections.Generic.KeyValuePair.op_Implicit(WinRT.ObjectReference)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.ObjectReference ABI.System.Collections.Generic.KeyValuePair._FromAbi(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.KeyValuePairMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.KeyValuePairMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Generic.ToAbiEnumeratorAdapter' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Collections.Specialized.INotifyCollectionChangedMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.CopyAbiArray(System.Collections.Specialized.NotifyCollectionChangedEventArgs[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.CreateMarshalerArray(System.Collections.Specialized.NotifyCollectionChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Collections.Specialized.NotifyCollectionChangedEventArgs[] ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.FromManagedArray(System.Collections.Specialized.NotifyCollectionChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.CopyAbiArray(System.Collections.Specialized.NotifyCollectionChangedEventHandler[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.CreateMarshalerArray(System.Collections.Specialized.NotifyCollectionChangedEventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Collections.Specialized.NotifyCollectionChangedEventHandler[] ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.FromManagedArray(System.Collections.Specialized.NotifyCollectionChangedEventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.DataErrorsChangedEventArgs.CopyAbiArray(System.ComponentModel.DataErrorsChangedEventArgs[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.ComponentModel.DataErrorsChangedEventArgs.CreateMarshalerArray(System.ComponentModel.DataErrorsChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.DataErrorsChangedEventArgs.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.DataErrorsChangedEventArgs.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ComponentModel.DataErrorsChangedEventArgs[] ABI.System.ComponentModel.DataErrorsChangedEventArgs.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.DataErrorsChangedEventArgs.FromManagedArray(System.ComponentModel.DataErrorsChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.DataErrorsChangedEventArgs.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.ComponentModel.INotifyDataErrorInfoMethods' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.ComponentModel.INotifyPropertyChangedMethods' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventArgs.CopyAbiArray(System.ComponentModel.PropertyChangedEventArgs[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.ComponentModel.PropertyChangedEventArgs.CreateMarshalerArray(System.ComponentModel.PropertyChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventArgs.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventArgs.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ComponentModel.PropertyChangedEventArgs[] ABI.System.ComponentModel.PropertyChangedEventArgs.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.PropertyChangedEventArgs.FromManagedArray(System.ComponentModel.PropertyChangedEventArgs[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.PropertyChangedEventArgs.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventHandler.CopyAbiArray(System.ComponentModel.PropertyChangedEventHandler[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.MarshalInterfaceHelper.MarshalerArray ABI.System.ComponentModel.PropertyChangedEventHandler.CreateMarshalerArray(System.ComponentModel.PropertyChangedEventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventHandler.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.ComponentModel.PropertyChangedEventHandler.DisposeMarshalerArray(WinRT.MarshalInterfaceHelper.MarshalerArray)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ComponentModel.PropertyChangedEventHandler[] ABI.System.ComponentModel.PropertyChangedEventHandler.FromAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.PropertyChangedEventHandler.FromManagedArray(System.ComponentModel.PropertyChangedEventHandler[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ValueTuple ABI.System.ComponentModel.PropertyChangedEventHandler.GetAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.System.Windows.Input.ICommandMethods' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.As()' in the implementation but not the reference. -TypesMustExist : Type 'ABI.WinRT.Interop.IActivationFactoryMethods' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'WinRT.WinRTExposedTypeAttribute' exists on 'Windows.Foundation.Point' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.WinRTExposedTypeAttribute' exists on 'Windows.Foundation.Rect' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.WinRTExposedTypeAttribute' exists on 'Windows.Foundation.Size' in the implementation but not the reference. -TypesMustExist : Type 'WinRT.ActivationFactory' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersSupport.RegisterAuthoringMetadataTypeLookup(System.Func)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersSupport.RegisterComInterfaceEntries(System.Type, System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry[])' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean WinRT.ComWrappersSupport.RegisterDelegateFactory(System.Type, System.Func)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersSupport.RegisterHelperType(System.Type, System.Type)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersSupport.RegisterTypeComInterfaceEntriesLookup(System.Func)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean WinRT.ComWrappersSupport.RegisterTypedRcwFactory(System.Type, System.Func)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.DelegateTypeDetails' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'WinRT.WinRTExposedTypeAttribute' exists on 'WinRT.EventRegistrationToken' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.WindowsRuntimeHelperTypeAttribute' exists on 'WinRT.EventRegistrationToken' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.WindowsRuntimeTypeAttribute' exists on 'WinRT.EventRegistrationToken' in the implementation but not the reference. -TypesMustExist : Type 'WinRT.EventRegistrationTokenTable' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.AsType()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.AsType()' in the implementation but not the reference. -MembersMustExist : Member 'public System.Boolean WinRT.IObjectReference.IsFreeThreaded.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Boolean WinRT.IObjectReference.IsInCurrentContext.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.IWinRTExposedTypeDetails' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.MarshalInspectable.CopyAbiArray(T[], System.Object)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.ReadOnlySpan WinRT.MarshalString.FromAbiUnsafe(System.IntPtr)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.ObjectReference WinRT.ObjectReference.Attach(System.IntPtr, System.Guid)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.ObjectReference WinRT.ObjectReference.FromAbi(System.IntPtr, System.Guid)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public WinRT.ObjectReference WinRT.ObjectReference.FromAbi(System.IntPtr, T, System.Guid)' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.ObjectReferenceWrapperAttribute' in the implementation but not the reference. -MembersMustExist : Member 'public void WinRT.Projections.RegisterDataErrorsChangedEventArgsMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterDateTimeOffsetMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterEventHandlerMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterEventHandlerOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterEventRegistrationTokenMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterExceptionMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIBindableVectorMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterICollectionMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterICollectionOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterICommandMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIDictionaryOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIDisposableMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIEnumerableMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIEnumerableOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIEnumeratorOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIListMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIListOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIMapOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIMapViewOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterINotifyCollectionChangedMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterINotifyDataErrorInfoMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterINotifyPropertyChangedMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIReadOnlyCollectionOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIReadOnlyDictionaryOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIReadOnlyListOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIServiceProviderMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIVectorOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterIVectorViewOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterKeyValuePairOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterMatrix3x2Mapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterMatrix4x4Mapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNotifyCollectionChangedActionMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNotifyCollectionChangedEventArgsMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNotifyCollectionChangedEventHandlerMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableBoolMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableByteMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableCharMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableDateTimeOffsetMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableDoubleMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableFloatMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableGuidMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableIntMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableLongMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableOpenGenericMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableSByteMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableShortMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableTimeSpanMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableUIntMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableULongMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterNullableUShortMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterPlaneMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterPropertyChangedEventArgsMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterPropertyChangedEventHandlerMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterQuaternionMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterTimeSpanMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterUriMapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterVector2Mapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterVector3Mapping()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.Projections.RegisterVector4Mapping()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.StructTypeDetails' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.WindowsRuntimeTypeAttribute..ctor(System.String, System.String)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.String WinRT.WindowsRuntimeTypeAttribute.GuidSignature.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.WinRTExposedTypeAttribute' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.WinRTImplementationTypeRcwFactoryAttribute' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'System.Type WinRT.Marshaler.RefAbiType' in the implementation but not the reference. -TypesMustExist : Type 'WinRT.Interop.IID' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.WinRT.Interop.EventSource' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.WinRT.Interop.EventSourceState' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.WinRT.Interop.EventHandlerEventSource' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'ABI.WinRT.Interop.EventHandlerEventSource' does not exist in the reference but it does exist in the implementation. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute' on 'WinRT.WindowsRuntimeHelperTypeAttribute.HelperType' changed from '[DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicMethods)]' in the implementation to '[DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.PublicNestedTypes)]' in the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.TypeExtensions.FindVftblType(System.Type)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.System.Nullable.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.System.Nullable.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.System.Collections.Generic.KeyValuePair.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.System.Collections.Generic.KeyValuePair.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IInspectable.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IInspectable.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.Projections.TryGetCompatibleWindowsRuntimeTypeForVariantType(System.Type, System.Type)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.GuidGenerator.GetGUID(System.Type)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'ABI.System.Nullable.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'ABI.System.Collections.Generic.KeyValuePair.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.AsInterface()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.IInspectable.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.TypeExtensions.FindHelperType(System.Type)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.Interop.WuxMuxProjectedTypeAttribute' exists on 'ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.Interop.WuxMuxProjectedTypeAttribute' exists on 'ABI.System.ComponentModel.PropertyChangedEventHandler' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'WinRT.Interop.WuxMuxProjectedTypeAttribute' exists on 'ABI.System.Collections.Specialized.NotifyCollectionChangedEventArgs' in the implementation but not the reference. -TypesMustExist : Type 'WinRT.WinRTRuntimeClassNameAttribute' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersSupport.RegisterTypeRuntimeClassNameLookup(System.Func)' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.Projections.FindCustomHelperTypeMapping(System.Type, System.Boolean)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IWinRTObject.GetOrCreateTypeHelperData(System.RuntimeTypeHandle, System.Func)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IWinRTObject.GetOrCreateTypeHelperData(System.RuntimeTypeHandle, System.Func)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.ObjectReference.Attach(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr, T)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.ComWrappersSupport.GetObjectReferenceForInterface(System.IntPtr)' in the implementation but not the reference. -CannotChangeAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' on 'ABI.System.Type.FromAbi(ABI.System.Type)' changed from '[UnconditionalSuppressMessageAttribute("Trimming", "IL2057", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the implementation to '[UnconditionalSuppressMessageAttribute("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification="Any types which are trimmed are not used by managed user code and there is fallback logic to handle that.")]' in the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute' exists on 'WinRT.Projections.FindCustomPublicTypeForAbiType(System.Type)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.IObjectReference.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.As()' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.ObjectReference.Attach(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.ObjectReference.Attach(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr, T)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.ObjectReference.FromAbi(System.IntPtr, T)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.TryAs(WinRT.ObjectReference)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.TryAs(WinRT.ObjectReference)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.IObjectReference.TryAs(WinRT.ObjectReference)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute' exists on 'WinRT.IInspectable.As()' in the implementation but not the reference. -MembersMustExist : Member 'protected WinRT.ObjectReference WinRT.ObjectReference ABI.WinRT.Interop.IActivationFactory._obj' does not exist in the reference but it does exist in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IInspectable..ctor(WinRT.ObjectReference)' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IInspectable..ctor(WinRT.ObjectReference)' in the implementation but not the reference. -MembersMustExist : Member 'public WinRT.IObjectReference WinRT.ComWrappersSupport.GetObjectReferenceForInterface(System.IntPtr, System.Guid, System.Boolean)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void WinRT.ComWrappersHelper.Init(System.Boolean, System.Object, System.IntPtr, System.IntPtr, System.Guid, WinRT.IObjectReference)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.EventHandler.IID.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.IID.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public System.Guid ABI.System.ComponentModel.PropertyChangedEventHandler.IID.get()' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.WinRTAssemblyExportsTypeAttribute' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Microsoft.UI.Xaml.Data.BindableCustomProperty' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.GeneratedBindableCustomPropertyAttribute' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Microsoft.UI.Xaml.Data.IBindableCustomPropertyImplementation' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'public void ABI.System.Uri.DisposeAbiArray(System.Object)' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'WinRT.EnumTypeDetails' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Windows.UI.Xaml.LayoutCycleException' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Windows.UI.Xaml.Automation.ElementNotAvailableException' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Windows.UI.Xaml.Automation.ElementNotEnabledException' does not exist in the reference but it does exist in the implementation. -TypesMustExist : Type 'Windows.UI.Xaml.Markup.XamlParseException' does not exist in the reference but it does exist in the implementation. -Total Issues: 278 diff --git a/src/WinRT.Runtime/WinRT.Runtime.csproj b/src/WinRT.Runtime/WinRT.Runtime.csproj index e4f4e5731..e95f467da 100644 --- a/src/WinRT.Runtime/WinRT.Runtime.csproj +++ b/src/WinRT.Runtime/WinRT.Runtime.csproj @@ -13,7 +13,6 @@ WinRT.Runtime $(VersionNumber) $(VersionNumber) - $(AssemblyVersionNumber) $(VersionNumber) en C#/WinRT Runtime v$(VersionString) @@ -28,6 +27,15 @@ false github + + + + $(AssemblyVersionNumber) + + + + 2.1.0.0 + @@ -78,12 +86,12 @@ true true true - 2.0.0 + 2.1.1 $(ApiCompatArgs) --allow-default-interface-methods $(MatchingRefApiCompatArgs) --allow-default-interface-methods - + @@ -93,10 +101,10 @@ - + <_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" /> - + @(_ReferencePathDirectories->Distinct(), ',') diff --git a/src/cswinrt.sln b/src/cswinrt.sln index 6235db9b4..7a02cc529 100644 --- a/src/cswinrt.sln +++ b/src/cswinrt.sln @@ -172,6 +172,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestImplementExclusiveTo", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NonWinRT", "Tests\FunctionalTests\NonWinRT\NonWinRT.csproj", "{54D6C10E-19C9-4BCF-B237-682C0120FC1F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptInMode", "Tests\FunctionalTests\OptInMode\OptInMode.csproj", "{FFC0B06E-78E7-44D5-8E67-8FE5744CE071}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -828,6 +830,18 @@ Global {54D6C10E-19C9-4BCF-B237-682C0120FC1F}.Release|x64.Build.0 = Release|x64 {54D6C10E-19C9-4BCF-B237-682C0120FC1F}.Release|x86.ActiveCfg = Release|x86 {54D6C10E-19C9-4BCF-B237-682C0120FC1F}.Release|x86.Build.0 = Release|x86 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|ARM.ActiveCfg = Debug|ARM + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|x64.ActiveCfg = Debug|x64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|x64.Build.0 = Debug|x64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|x86.ActiveCfg = Debug|x86 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Debug|x86.Build.0 = Debug|x86 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|ARM.ActiveCfg = Release|ARM + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|ARM64.ActiveCfg = Release|ARM64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|x64.ActiveCfg = Release|x64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|x64.Build.0 = Release|x64 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|x86.ActiveCfg = Release|x86 + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -879,6 +893,7 @@ Global {0B3A0096-5131-441B-935B-5E8A56343869} = {6D41796B-9904-40B8-BBCB-40B2D1BAE44B} {30EE902C-C1D3-40E0-B63C-59FFB4503633} = {5ECC38F0-16FD-47E1-B8DC-8C474008AD55} {54D6C10E-19C9-4BCF-B237-682C0120FC1F} = {5ECC38F0-16FD-47E1-B8DC-8C474008AD55} + {FFC0B06E-78E7-44D5-8E67-8FE5744CE071} = {5ECC38F0-16FD-47E1-B8DC-8C474008AD55} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5AE8C9D7-2613-4E1A-A4F2-579BAC28D0A2}