From 6cbc44c6fb7861d9246ae1775de11f35ff01f5f6 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Fri, 26 May 2023 09:52:26 -0700 Subject: [PATCH 01/16] wip - build crashes on refs --- eng/generators.targets | 3 +- .../InjectResource/InjectResource.csproj | 1 + .../Microsoft.NET.WebAssembly.Webcil.csproj | 1 + .../GeneratedComInterfaceAttributeAnalyzer.cs | 2 +- .../ComInterfaceContext.cs | 2 +- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 44 +++++++++--------- .../ComInterfaceGenerator/ComMethodInfo.cs | 10 ++--- .../gen/ComInterfaceGenerator/Comparers.cs | 2 +- .../GeneratedStubCodeContext.cs | 2 +- .../GeneratorDiagnostics.cs | 4 +- .../IncrementalMethodStubGenerationContext.cs | 4 +- .../SkippedStubContext.cs | 2 +- .../VirtualMethodPointerStubGenerator.cs | 4 +- .../VtableIndexStubGenerator.cs | 10 ++--- .../ConvertToLibraryImportAnalyzer.cs | 2 +- .../Analyzers/DiagnosticReporter.cs | 2 +- .../gen/LibraryImportGenerator/Comparers.cs | 4 +- .../GeneratorDiagnostics.cs | 6 +-- .../LibraryImportGenerator.cs | 12 ++--- .../DiagnosticInfo.cs | 45 +++++++++++++++++++ .../DiagnosticOr.cs | 18 ++++---- .../IGeneratorDiagnostics.cs | 24 +++++----- ...eneratorInitializationContextExtensions.cs | 4 +- .../LocationInfo.cs | 23 +++++++--- .../Microsoft.Interop.SourceGeneration.csproj | 3 ++ .../AndroidAppBuilder.csproj | 1 + .../AotCompilerTask/MonoAOTCompiler.csproj | 1 + .../AppleAppBuilder/AppleAppBuilder.csproj | 1 + .../AssemblyStripper/AssemblyStripper.csproj | 1 + .../WorkloadBuildTasks.csproj | 1 + .../installer.tasks/installer.tasks.csproj | 1 + 31 files changed, 154 insertions(+), 86 deletions(-) create mode 100644 src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs rename src/libraries/System.Runtime.InteropServices/gen/{ComInterfaceGenerator => Microsoft.Interop.SourceGeneration}/LocationInfo.cs (55%) diff --git a/eng/generators.targets b/eng/generators.targets index f14c60183a312a..6edfa3e6bd77fa 100644 --- a/eng/generators.targets +++ b/eng/generators.targets @@ -46,7 +46,8 @@ diff --git a/src/coreclr/tools/InjectResource/InjectResource.csproj b/src/coreclr/tools/InjectResource/InjectResource.csproj index f8537a0cb11d58..99ed76794b89d6 100644 --- a/src/coreclr/tools/InjectResource/InjectResource.csproj +++ b/src/coreclr/tools/InjectResource/InjectResource.csproj @@ -9,6 +9,7 @@ false $(RuntimeBinDir)\InjectResource false + false diff --git a/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj b/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj index 6c66737e5535d2..6c77b31ea8e4ef 100644 --- a/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj +++ b/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj @@ -6,6 +6,7 @@ true true false + false diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs index 11a628ddbd0a8c..f27a17f3595eeb 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs @@ -41,7 +41,7 @@ public override void Initialize(AnalysisContext context) && GetAttribute(typeSymbol, TypeNames.InterfaceTypeAttribute, out AttributeData? comInterfaceAttribute) && !InterfaceTypeAttributeIsSupported(comInterfaceAttribute, out string unsupportedValue)) { - context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported, unsupportedValue)); + context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic()); } }, SymbolKind.NamedType); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 54cfe877ec82e4..73905d58816ea7 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -57,7 +57,7 @@ DiagnosticOr AddContext(ComInterfaceInfo iface) { // The base has failed generation at some point, so this interface cannot be generated var diagnostic = DiagnosticOr.From( - Diagnostic.Create( + DiagnosticInfo.Create( GeneratorDiagnostics.BaseInterfaceIsNotGenerated, iface.DiagnosticLocation.AsLocation(), iface.ThisInterfaceKey, iface.BaseInterfaceKey)); nameToContextCache[iface.ThisInterfaceKey] = diagnostic; diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 31db875d638d48..987125ac75a840 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -9,6 +9,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Interop; +using DiagnosticOrInterfaceInfo = Microsoft.Interop.DiagnosticOr<(Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol) >; namespace Microsoft.Interop { @@ -25,7 +27,7 @@ internal sealed record ComInterfaceInfo( Guid InterfaceId, LocationInfo DiagnosticLocation) { - public static DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)> From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, CancellationToken _) + public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, CancellationToken _) { // Verify the method has no generic types or defined implementation // and is not marked static or sealed @@ -35,8 +37,8 @@ internal sealed record ComInterfaceInfo( // and is not marked static or sealed if (syntax.TypeParameterList is not null) { - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( - Diagnostic.Create( + return DiagnosticOrInterfaceInfo.From( + DiagnosticInfo.Create( GeneratorDiagnostics.InvalidAttributedInterfaceGenericNotSupported, syntax.Identifier.GetLocation(), symbol.Name)); @@ -48,8 +50,8 @@ internal sealed record ComInterfaceInfo( { if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword)) { - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( - Diagnostic.Create( + return DiagnosticOrInterfaceInfo.From( + DiagnosticInfo.Create( GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, syntax.Identifier.GetLocation(), symbol.Name, @@ -57,16 +59,16 @@ internal sealed record ComInterfaceInfo( } } - if (!TryGetGuid(symbol, syntax, out Guid? guid, out Diagnostic? guidDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(guidDiagnostic); + if (!TryGetGuid(symbol, syntax, out Guid? guid, out DiagnosticInfo? guidDiagnostic)) + return DiagnosticOrInterfaceInfo.From(guidDiagnostic); - if (!TryGetBaseComInterface(symbol, syntax, out INamedTypeSymbol? baseSymbol, out Diagnostic? baseDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(baseDiagnostic); + if (!TryGetBaseComInterface(symbol, syntax, out INamedTypeSymbol? baseSymbol, out DiagnosticInfo? baseDiagnostic)) + return DiagnosticOrInterfaceInfo.From(baseDiagnostic); - if (!StringMarshallingIsValid(symbol, syntax, baseSymbol, out Diagnostic? stringMarshallingDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(stringMarshallingDiagnostic); + if (!StringMarshallingIsValid(symbol, syntax, baseSymbol, out DiagnosticInfo? stringMarshallingDiagnostic)) + return DiagnosticOrInterfaceInfo.From(stringMarshallingDiagnostic); - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( + return DiagnosticOrInterfaceInfo.From( (new ComInterfaceInfo( ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol), symbol.ToDisplayString(), @@ -75,18 +77,18 @@ internal sealed record ComInterfaceInfo( new ContainingSyntaxContext(syntax), new ContainingSyntax(syntax.Modifiers, syntax.Kind(), syntax.Identifier, syntax.TypeParameterList), guid ?? Guid.Empty, - LocationInfo.From(symbol)), + LocationInfo.FromSymbol(symbol)), symbol)); } - private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, INamedTypeSymbol? baseSymbol, [NotNullWhen(false)] out Diagnostic? stringMarshallingDiagnostic) + private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, INamedTypeSymbol? baseSymbol, [NotNullWhen(false)] out DiagnosticInfo? stringMarshallingDiagnostic) { var attrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol)); if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) { if (attrInfo.StringMarshalling is StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is null) { - stringMarshallingDiagnostic = Diagnostic.Create( + stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, syntax.Identifier.GetLocation(), symbol.ToDisplayString(), @@ -95,7 +97,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD } if (attrInfo.StringMarshalling is not StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is not null) { - stringMarshallingDiagnostic = Diagnostic.Create( + stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, syntax.Identifier.GetLocation(), symbol.ToDisplayString(), @@ -110,7 +112,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD if ((baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) && baseAttrInfo != attrInfo) { - stringMarshallingDiagnostic = Diagnostic.Create( + stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, syntax.Identifier.GetLocation(), symbol.ToDisplayString(), @@ -125,7 +127,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD /// /// Returns true if there is 0 or 1 base Com interfaces (i.e. the inheritance is valid), and returns false when there are 2 or more base Com interfaces and sets . /// - private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceDeclarationSyntax syntax, out INamedTypeSymbol? baseComIface, [NotNullWhen(false)] out Diagnostic? diagnostic) + private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceDeclarationSyntax syntax, out INamedTypeSymbol? baseComIface, [NotNullWhen(false)] out DiagnosticInfo? diagnostic) { baseComIface = null; foreach (var implemented in comIface.Interfaces) @@ -136,7 +138,7 @@ private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceD { if (baseComIface is not null) { - diagnostic = Diagnostic.Create( + diagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.MultipleComInterfaceBaseTypes, syntax.Identifier.GetLocation(), comIface.ToDisplayString()); @@ -153,7 +155,7 @@ private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceD /// /// Returns true and sets if the guid is present. Returns false and sets diagnostic if the guid is not present or is invalid. /// - private static bool TryGetGuid(INamedTypeSymbol interfaceSymbol, InterfaceDeclarationSyntax syntax, [NotNullWhen(true)] out Guid? guid, [NotNullWhen(false)] out Diagnostic? diagnostic) + private static bool TryGetGuid(INamedTypeSymbol interfaceSymbol, InterfaceDeclarationSyntax syntax, [NotNullWhen(true)] out Guid? guid, [NotNullWhen(false)] out DiagnosticInfo? diagnostic) { guid = null; AttributeData? guidAttr = null; @@ -178,7 +180,7 @@ private static bool TryGetGuid(INamedTypeSymbol interfaceSymbol, InterfaceDeclar // Assume interfaceType is IUnknown for now if (guid is null) { - diagnostic = Diagnostic.Create( + diagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidAttributedInterfaceMissingGuidAttribute, syntax.Identifier.GetLocation(), interfaceSymbol.ToDisplayString()); diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs index 4d220d29538549..27f2fdc4fe87aa 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs @@ -34,7 +34,7 @@ internal sealed record ComMethodInfo( return methods.ToImmutable().ToSequenceEqual(); } - private static Diagnostic? GetDiagnosticIfInvalidMethodForGeneration(MethodDeclarationSyntax comMethodDeclaringSyntax, IMethodSymbol method) + private static DiagnosticInfo? GetDiagnosticIfInvalidMethodForGeneration(MethodDeclarationSyntax comMethodDeclaringSyntax, IMethodSymbol method) { // Verify the method has no generic types or defined implementation // and is not marked static or sealed @@ -42,13 +42,13 @@ internal sealed record ComMethodInfo( || comMethodDeclaringSyntax.Body is not null || comMethodDeclaringSyntax.Modifiers.Any(SyntaxKind.SealedKeyword)) { - return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); + return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); } // Verify the method does not have a ref return if (method.ReturnsByRef || method.ReturnsByRefReadonly) { - return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); + return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); } return null; @@ -82,7 +82,7 @@ private static bool IsComMethodCandidate(ISymbol member) if (methodLocationInAttributedInterfaceDeclaration is null) { - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); + return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); } @@ -100,7 +100,7 @@ private static bool IsComMethodCandidate(ISymbol member) } if (comMethodDeclaringSyntax is null) { - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString())); + return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString())); } var diag = GetDiagnosticIfInvalidMethodForGeneration(comMethodDeclaringSyntax, method); diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Comparers.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Comparers.cs index 3d710b6290e860..4f59d919804bc1 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Comparers.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Comparers.cs @@ -15,7 +15,7 @@ internal static class Comparers /// /// Comparer for an individual generated stub source as a syntax tree and the generated diagnostics for the stub. /// - public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); + public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); } /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedStubCodeContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedStubCodeContext.cs index 6f0966ed776505..6f11382a5b4e4d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedStubCodeContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedStubCodeContext.cs @@ -10,5 +10,5 @@ internal sealed record GeneratedStubCodeContext( ManagedTypeInfo OriginalDefiningType, ContainingSyntaxContext ContainingSyntaxContext, SyntaxEquivalentNode Stub, - SequenceEqualImmutableArray Diagnostics) : GeneratedMethodContextBase(OriginalDefiningType, Diagnostics); + SequenceEqualImmutableArray Diagnostics) : GeneratedMethodContextBase(OriginalDefiningType, Diagnostics); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index 2c47e3f5daacfc..59be062df25c92 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -259,9 +259,9 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.BaseInterfaceCannotBeGeneratedDescription))); - private readonly List _diagnostics = new List(); + private readonly List _diagnostics = new List(); - public IEnumerable Diagnostics => _diagnostics; + public IEnumerable Diagnostics => _diagnostics; /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/IncrementalMethodStubGenerationContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/IncrementalMethodStubGenerationContext.cs index fae4de0e1167c5..711cd89a99b648 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/IncrementalMethodStubGenerationContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/IncrementalMethodStubGenerationContext.cs @@ -7,7 +7,7 @@ namespace Microsoft.Interop { - internal abstract record GeneratedMethodContextBase(ManagedTypeInfo OriginalDefiningType, SequenceEqualImmutableArray Diagnostics); + internal abstract record GeneratedMethodContextBase(ManagedTypeInfo OriginalDefiningType, SequenceEqualImmutableArray Diagnostics); internal sealed record IncrementalMethodStubGenerationContext( SignatureContext SignatureContext, @@ -21,6 +21,6 @@ internal sealed record IncrementalMethodStubGenerationContext( MarshallingGeneratorFactoryKey<(TargetFramework TargetFramework, Version TargetFrameworkVersion)> UnmanagedToManagedGeneratorFactory, ManagedTypeInfo TypeKeyOwner, ManagedTypeInfo DeclaringType, - SequenceEqualImmutableArray Diagnostics, + SequenceEqualImmutableArray Diagnostics, MarshallingInfo ManagedThisMarshallingInfo) : GeneratedMethodContextBase(DeclaringType, Diagnostics); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/SkippedStubContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/SkippedStubContext.cs index aa9ef047ba0490..6f4b474a914d2a 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/SkippedStubContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/SkippedStubContext.cs @@ -6,5 +6,5 @@ namespace Microsoft.Interop { - internal sealed record SkippedStubContext(ManagedTypeInfo OriginalDefiningType) : GeneratedMethodContextBase(OriginalDefiningType, new(ImmutableArray.Empty)); + internal sealed record SkippedStubContext(ManagedTypeInfo OriginalDefiningType) : GeneratedMethodContextBase(OriginalDefiningType, new(ImmutableArray.Empty)); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VirtualMethodPointerStubGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VirtualMethodPointerStubGenerator.cs index e813c8fb906e6e..f5a8a713db3d97 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VirtualMethodPointerStubGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VirtualMethodPointerStubGenerator.cs @@ -15,7 +15,7 @@ namespace Microsoft.Interop { internal static class VirtualMethodPointerStubGenerator { - public static (MethodDeclarationSyntax, ImmutableArray) GenerateManagedToNativeStub( + public static (MethodDeclarationSyntax, ImmutableArray) GenerateManagedToNativeStub( IncrementalMethodStubGenerationContext methodStub) { var diagnostics = new GeneratorDiagnostics(); @@ -65,7 +65,7 @@ private static MethodDeclarationSyntax PrintGeneratedSource( private const string ThisParameterIdentifier = "@this"; - public static (MethodDeclarationSyntax, ImmutableArray) GenerateNativeToManagedStub( + public static (MethodDeclarationSyntax, ImmutableArray) GenerateNativeToManagedStub( IncrementalMethodStubGenerationContext methodStub) { var diagnostics = new GeneratorDiagnostics(); diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VtableIndexStubGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VtableIndexStubGenerator.cs index 43600ca57e37e5..f674968c81f392 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VtableIndexStubGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/VtableIndexStubGenerator.cs @@ -75,7 +75,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .WithTrackingName(StepNames.CalculateStubInformation); // Generate the code for the managed-to-unmangaed stubs and the diagnostics from code-generation. - IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateManagedToNativeStub = generateStubInformation + IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateManagedToNativeStub = generateStubInformation .Where(data => data.VtableIndexData.Direction is MarshalDirection.ManagedToUnmanaged or MarshalDirection.Bidirectional) .Select( static (data, ct) => GenerateManagedToNativeStub(data) @@ -93,7 +93,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .Where(data => data.VtableIndexData.Direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional); // Generate the code for the unmanaged-to-managed stubs and the diagnostics from code-generation. - IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateNativeToManagedStub = nativeToManagedStubContexts + IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateNativeToManagedStub = nativeToManagedStubContexts .Select( static (data, ct) => GenerateNativeToManagedStub(data) ) @@ -311,7 +311,7 @@ private static IncrementalMethodStubGenerationContext CalculateStubInformation(M VtableIndexStubGeneratorHelpers.CreateGeneratorFactory(environment, MarshalDirection.UnmanagedToManaged), interfaceType, interfaceType, - new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray()), + new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray()), new ObjectUnwrapperInfo(unwrapperSyntax)); } @@ -356,7 +356,7 @@ private static MarshallingInfo CreateExceptionMarshallingInfo(AttributeData virt return NoMarshallingInfo.Instance; } - private static (MemberDeclarationSyntax, ImmutableArray) GenerateManagedToNativeStub( + private static (MemberDeclarationSyntax, ImmutableArray) GenerateManagedToNativeStub( IncrementalMethodStubGenerationContext methodStub) { var (stub, diagnostics) = VirtualMethodPointerStubGenerator.GenerateManagedToNativeStub(methodStub); @@ -369,7 +369,7 @@ private static (MemberDeclarationSyntax, ImmutableArray) GenerateMan methodStub.Diagnostics.Array.AddRange(diagnostics)); } - private static (MemberDeclarationSyntax, ImmutableArray) GenerateNativeToManagedStub( + private static (MemberDeclarationSyntax, ImmutableArray) GenerateNativeToManagedStub( IncrementalMethodStubGenerationContext methodStub) { var (stub, diagnostics) = VirtualMethodPointerStubGenerator.GenerateNativeToManagedStub(methodStub); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs index 69bd46cbf5cec1..62d1dfdc265162 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs @@ -136,7 +136,7 @@ private static void AnalyzeSymbol(SymbolAnalysisContext context, INamedTypeSymbo properties.Add(ExactSpelling, dllImportData.ExactSpelling.ToString()); properties.Add(MayRequireAdditionalWork, mayRequireAdditionalWork.ToString()); - context.ReportDiagnostic(method.CreateDiagnostic(ConvertToLibraryImport, properties.ToImmutable(), method.Name)); + context.ReportDiagnostic(method.CreateDiagnostic(ConvertToLibraryImport, properties.ToImmutable(), method.Name).ToDiagnostic()); } private static bool HasUnsupportedMarshalAsInfo(TypePositionInfo info) diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs index 27a9dbebc5f78b..d1534f58203b5d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs @@ -16,7 +16,7 @@ public DiagnosticReporter(Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnostic(descriptor, properties, args))); + public static DiagnosticReporter CreateForLocation(Location location, Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnostic(descriptor, properties, args).ToDiagnostic())); public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, params object[] messageArgs) => _diagnosticFactory(descriptor, ImmutableDictionary.Empty, messageArgs); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Comparers.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Comparers.cs index 3d710b6290e860..87a565111f6b1e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Comparers.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Comparers.cs @@ -15,8 +15,8 @@ internal static class Comparers /// /// Comparer for an individual generated stub source as a syntax tree and the generated diagnostics for the stub. /// - public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); - } + public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); + } /// /// Generic comparer to compare two instances element by element. diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs index 920be3c33de52a..e8ca2e5cd83cc5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs @@ -169,9 +169,9 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.RequiresAllowUnsafeBlocksDescription))); - private readonly List _diagnostics = new List(); + private readonly List _diagnostics = new List(); - public IEnumerable Diagnostics => _diagnostics; + public IEnumerable Diagnostics => _diagnostics; /// /// Report diagnostic for invalid configuration for string marshalling. @@ -336,7 +336,7 @@ public void ReportInvalidMarshallingAttributeInfo( public void ReportCannotForwardToDllImport(MethodSignatureDiagnosticLocations method, string name, string? value = null) { _diagnostics.Add( - Diagnostic.Create( + DiagnosticInfo.Create( CannotForwardToDllImport, method.FallbackLocation, value is null ? name : $"{name}={value}")); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs index b0b14372adec30..8bc3457b08ff40 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs @@ -28,7 +28,7 @@ internal sealed record IncrementalStubGenerationContext( SequenceEqualImmutableArray ForwardedAttributes, LibraryImportData LibraryImportData, MarshallingGeneratorFactoryKey<(TargetFramework TargetFramework, Version Version, LibraryImportGeneratorOptions Options)> GeneratorFactoryKey, - SequenceEqualImmutableArray Diagnostics); + SequenceEqualImmutableArray Diagnostics); public static class StepNames { @@ -78,13 +78,13 @@ public void Initialize(IncrementalGeneratorInitializationContext context) || data.Left.Compilation.Options is CSharpCompilationOptions { AllowUnsafe: true } // Unsafe code enabled || data.Left.TargetFramework != TargetFramework.Net) // Non-.NET 5 scenarios use forwarders and don't need unsafe code { - return ImmutableArray.Empty; + return ImmutableArray.Empty; } - return ImmutableArray.Create(Diagnostic.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null)); + return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null)); })); - IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate + IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate .Combine(stubEnvironment) .Combine(stubOptions) .Select(static (data, ct) => new @@ -303,11 +303,11 @@ private static IncrementalStubGenerationContext CalculateStubInformation( new SequenceEqualImmutableArray(additionalAttributes.ToImmutableArray(), SyntaxEquivalentComparer.Instance), LibraryImportData.From(libraryImportData), LibraryImportGeneratorHelpers.CreateGeneratorFactory(environment, options), - new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray()) + new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray()) ); } - private static (MemberDeclarationSyntax, ImmutableArray) GenerateSource( + private static (MemberDeclarationSyntax, ImmutableArray) GenerateSource( IncrementalStubGenerationContext pinvokeStub, LibraryImportGeneratorOptions options) { diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs new file mode 100644 index 00000000000000..851ea5cc6ef17b --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Immutable; +using System.Linq; +using Microsoft.CodeAnalysis; + +namespace Microsoft.Interop +{ + public record DiagnosticInfo + { + public required DiagnosticDescriptor Descriptor { get; init; } + public required SequenceEqualImmutableArray MessageArgs { get; init; } + public required LocationInfo? Location { get; init; } + public required ValueEqualityImmutableDictionary? Properties { get; init; } + + public Diagnostic ToDiagnostic() => Diagnostic.Create( + Descriptor, + Location.AsLocation(), + properties: Properties?.Map, + messageArgs: MessageArgs); + + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, params object?[] messageArgs) + { + return new DiagnosticInfo() + { + Descriptor = descriptor, + Location = LocationInfo.FromLocation(location), + Properties = null, + MessageArgs = messageArgs.Select(o => o.ToString()).ToSequenceEqualImmutableArray() + }; + } + + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, ImmutableDictionary? properties, params object?[] messageArgs) + { + return new DiagnosticInfo() + { + Descriptor = descriptor, + Location = LocationInfo.FromLocation(location), + Properties = properties.ToValueEquals(), + MessageArgs = messageArgs.Select(o => o.ToString()).ToSequenceEqualImmutableArray() + }; + } + } +} diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs index 0be31fa6277675..caa15d3a0d6664 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs @@ -32,15 +32,15 @@ public abstract record DiagnosticOr /// /// Throws if IsDiagnostic is false /// - public abstract Diagnostic Diagnostic { get; } + public abstract DiagnosticInfo Diagnostic { get; } private sealed record Diag : DiagnosticOr { - private readonly Diagnostic _diagnostic; - internal Diag(Diagnostic diagnostic) => _diagnostic = diagnostic; + private readonly DiagnosticInfo _diagnostic; + internal Diag(DiagnosticInfo diagnostic) => _diagnostic = diagnostic; public override bool IsValue => false; public override T Value => throw new InvalidOperationException(); - public override Diagnostic Diagnostic => _diagnostic; + public override DiagnosticInfo Diagnostic => _diagnostic; } private sealed record Val : DiagnosticOr @@ -49,13 +49,13 @@ private sealed record Val : DiagnosticOr internal Val(T value) => _value = value; public override bool IsValue => true; public override T Value => _value; - public override Diagnostic Diagnostic => throw new InvalidOperationException(); + public override DiagnosticInfo Diagnostic => throw new InvalidOperationException(); } /// /// Create a Diagnostic variant /// - public static DiagnosticOr From(Diagnostic diagnostic) + public static DiagnosticOr From(DiagnosticInfo diagnostic) { Debug.Assert(diagnostic is not null); return new Diag(diagnostic); @@ -76,7 +76,7 @@ public static class DiagnosticOrTHelperExtensions /// /// Splits the elements of into a "values" provider and a "diagnositics" provider. /// - public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider> provider) + public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider> provider) { var values = provider.Where(x => x.IsValue).Select(static (x, ct) => x.Value); var diagnostics = provider.Where(x => x.IsDiagnostic).Select(static (x, ct) => x.Diagnostic); @@ -86,7 +86,7 @@ public static (IncrementalValuesProvider, IncrementalValuesProvider /// Splits the inner arrays of into values and diagnostics. /// - public static (IncrementalValuesProvider>, IncrementalValuesProvider) SplitArrays(this IncrementalValuesProvider>> provider) + public static (IncrementalValuesProvider>, IncrementalValuesProvider) SplitArrays(this IncrementalValuesProvider>> provider) { var values = provider.Select((arr, ct) => arr.Where(x => x.IsValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray()); var diagnostics = provider.SelectMany((arr, ct) => arr.Where(x => x.IsDiagnostic).Select((x, ct) => x.Diagnostic)); @@ -96,7 +96,7 @@ public static (IncrementalValuesProvider>, Increm /// /// Splits the elements of into groups depending on whether Item1 is a value or a Diagnostic. /// - public static (IncrementalValuesProvider<(T, T2)>, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(DiagnosticOr, T2)> provider) + public static (IncrementalValuesProvider<(T, T2)>, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(DiagnosticOr, T2)> provider) { var values = provider.Where(x => x.Item1.IsValue).Select(static (x, ct) => (x.Item1.Value, x.Item2)); var diagnostics = provider.Where(x => !x.Item1.IsValue).Select(static (x, ct) => x.Item1.Diagnostic); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs index 47c94836859485..65c93b6915f286 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs @@ -13,7 +13,7 @@ namespace Microsoft.Interop { public static class DiagnosticExtensions { - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this ISymbol symbol, DiagnosticDescriptor descriptor, params object[] args) @@ -21,7 +21,7 @@ public static Diagnostic CreateDiagnostic( return symbol.Locations.CreateDiagnostic(descriptor, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this ISymbol symbol, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -30,7 +30,7 @@ public static Diagnostic CreateDiagnostic( return symbol.Locations.CreateDiagnostic(descriptor, properties, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this AttributeData attributeData, DiagnosticDescriptor descriptor, params object[] args) @@ -43,7 +43,7 @@ public static Diagnostic CreateDiagnostic( return location.CreateDiagnostic(descriptor, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this AttributeData attributeData, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -57,7 +57,7 @@ public static Diagnostic CreateDiagnostic( return location.CreateDiagnostic(descriptor, properties, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this ImmutableArray locations, DiagnosticDescriptor descriptor, params object[] args) @@ -65,7 +65,7 @@ public static Diagnostic CreateDiagnostic( return CreateDiagnostic(locations, descriptor, properties: null, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this ImmutableArray locations, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -89,28 +89,28 @@ public static Diagnostic CreateDiagnostic( } return firstLocation is null ? - Diagnostic.Create(descriptor, Location.None, properties: properties, args) : - Diagnostic.Create(descriptor, firstLocation, additionalLocations, properties, args); + DiagnosticInfo.Create(descriptor, Location.None, properties: properties, args) : + DiagnosticInfo.Create(descriptor, firstLocation, additionalLocations, properties, args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this Location location, DiagnosticDescriptor descriptor, params object[] args) { - return Diagnostic.Create( + return DiagnosticInfo.Create( descriptor, location: location.IsInSource ? location : Location.None, messageArgs: args); } - public static Diagnostic CreateDiagnostic( + public static DiagnosticInfo CreateDiagnostic( this Location location, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { - return Diagnostic.Create( + return DiagnosticInfo.Create( descriptor, location: location.IsInSource ? location : Location.None, properties: properties, diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs index d0adc407312d12..4c323853d9415d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs @@ -37,11 +37,11 @@ public static IncrementalValueProvider CreateStubEnvironmentPro new StubEnvironment(data.Right, data.Left.Left.TargetFramework, data.Left.Left.Version, data.Left.Right)); } - public static void RegisterDiagnostics(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider diagnostics) + public static void RegisterDiagnostics(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider diagnostics) { context.RegisterSourceOutput(diagnostics.Where(diag => diag is not null), (context, diagnostic) => { - context.ReportDiagnostic(diagnostic); + context.ReportDiagnostic(diagnostic.ToDiagnostic()); }); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs similarity index 55% rename from src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs rename to src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs index 982e1ca75bc6ab..7dfbacf48c396f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs @@ -9,21 +9,30 @@ namespace Microsoft.Interop /// /// Contains data required to reconstruct a without keeping any symbols or references to a /// - internal sealed record LocationInfo( - LinePositionSpan LinePositionSpan, - string FilePath, - TextSpan TextSpan) + public sealed record LocationInfo { + public required LinePositionSpan LinePositionSpan { get; init; } + public required string FilePath { get; init; } + public required TextSpan TextSpan { get; init; } public Location AsLocation() => Location.Create(FilePath, TextSpan, LinePositionSpan); - public static LocationInfo From(ISymbol symbol) + public static LocationInfo FromSymbol(ISymbol symbol) { var location = symbol.Locations[0]; + return FromLocation(location); + } + + public static LocationInfo FromLocation(Location location) + { var lineSpan = location.GetLineSpan().Span; var filePath = location.SourceTree.FilePath; var textSpan = location.SourceSpan; - - return new LocationInfo(lineSpan, filePath, textSpan); + return new LocationInfo() + { + LinePositionSpan = lineSpan, + FilePath = filePath, + TextSpan = textSpan + }; } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj index 825fb6c60b8e3a..a1efa403dffbfa 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj @@ -17,6 +17,9 @@ + + + diff --git a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj index 2481e55817915c..26f8511e93e043 100644 --- a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj +++ b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj @@ -6,6 +6,7 @@ false enable $(NoWarn),CA1050,CA1850 + false diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj index e76730b5aeca07..dbed91bbb503de 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj @@ -10,6 +10,7 @@ $(NoWarn),CS8604,CS8602 true + false diff --git a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj index 233333c8dcd15a..f8b7abb191b0bf 100644 --- a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj +++ b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj @@ -6,6 +6,7 @@ false enable $(NoWarn),CA1050,CA1850 + false diff --git a/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj b/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj index 2eb8a61b6330fb..5f8a4c625e7a32 100644 --- a/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj +++ b/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj @@ -10,6 +10,7 @@ $(NoWarn),CS0618,CS0649,SYSLIB0003,SYSLIB0037 false + false diff --git a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj index fbb13d8d9c4ecf..39c3fcce95d210 100644 --- a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj +++ b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj @@ -3,6 +3,7 @@ $(TargetFrameworkForNETCoreTasks) enable $(NoWarn),CA1050,CA1850 + false diff --git a/src/tasks/installer.tasks/installer.tasks.csproj b/src/tasks/installer.tasks/installer.tasks.csproj index 98c370fdfedb13..83b855b2301b8f 100644 --- a/src/tasks/installer.tasks/installer.tasks.csproj +++ b/src/tasks/installer.tasks/installer.tasks.csproj @@ -3,6 +3,7 @@ $(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent) false false + false From 5cb008fbc60f74e61bb6c44d74627eefc6e290ab Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Fri, 26 May 2023 09:52:58 -0700 Subject: [PATCH 02/16] wip --- .../ValueEqualityImmutableDictionary.cs | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ValueEqualityImmutableDictionary.cs diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ValueEqualityImmutableDictionary.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ValueEqualityImmutableDictionary.cs new file mode 100644 index 00000000000000..f0a4b3737a08e3 --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ValueEqualityImmutableDictionary.cs @@ -0,0 +1,79 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Immutable; + +namespace Microsoft.Interop +{ + public record struct ValueEqualityImmutableDictionary(ImmutableDictionary Map) : IDictionary + { + // Since this is immutable, we can cache the hash, which requires sorting and is expensive to calculate + private int? _hash = null; + + public bool Equals(ValueEqualityImmutableDictionary other) + { + if (Count != other.Count) + { + return false; + } + + foreach (var kvp in this) + { + if (!other.TryGetValue(kvp.Key, out var value) || !kvp.Value.Equals(value)) + { + return false; + } + } + return true; + } + + public override int GetHashCode() + { + if (_hash.HasValue) + return _hash.Value; + + _hash = 0; + foreach (var kvp in Map.ToImmutableArray().Sort()) + { + _hash = HashCode.Combine(_hash, kvp.Key, kvp.Value); + } + return _hash.Value; + } + + public U this[T key] { get => ((IDictionary)Map)[key]; set => ((IDictionary)Map)[key] = value; } + public ICollection Keys => ((IDictionary)Map).Keys; + public ICollection Values => ((IDictionary)Map).Values; + public int Count => Map.Count; + public bool IsReadOnly => ((ICollection>)Map).IsReadOnly; + public bool Contains(KeyValuePair item) => Map.Contains(item); + public bool ContainsKey(T key) => Map.ContainsKey(key); + public void CopyTo(KeyValuePair[] array, int arrayIndex) => ((ICollection>)Map).CopyTo(array, arrayIndex); + public IEnumerator> GetEnumerator() => ((IEnumerable>)Map).GetEnumerator(); + public bool Remove(T key) => ((IDictionary)Map).Remove(key); + public bool Remove(KeyValuePair item) => ((ICollection>)Map).Remove(item); + public bool TryGetValue(T key, out U value) => Map.TryGetValue(key, out value); + IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable)Map).GetEnumerator(); + public void Add(T key, U value) => ((IDictionary)Map).Add(key, value); + public void Add(KeyValuePair item) => ((ICollection>)Map).Add(item); + public void Clear() => ((ICollection>)Map).Clear(); + } + + public static class ValueEqualityImmutableDictionaryHelperExtensions + { + public static ValueEqualityImmutableDictionary ToValueEqualityImmutableDictionary( + this IEnumerable source, + Func keySelector, + Func valueSelector) + { + return new ValueEqualityImmutableDictionary(source.ToImmutableDictionary(keySelector, valueSelector)); + } + public static ValueEqualityImmutableDictionary ToValueEquals(this ImmutableDictionary source) + { + return new ValueEqualityImmutableDictionary(source); + } + + } +} From 355fe17d067dc1a1cdf221931d80b2d0472e14e9 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Fri, 26 May 2023 10:02:41 -0700 Subject: [PATCH 03/16] wip --- .../gen/ComInterfaceGenerator/LocationInfo.cs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs new file mode 100644 index 00000000000000..982e1ca75bc6ab --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Text; + +namespace Microsoft.Interop +{ + /// + /// Contains data required to reconstruct a without keeping any symbols or references to a + /// + internal sealed record LocationInfo( + LinePositionSpan LinePositionSpan, + string FilePath, + TextSpan TextSpan) + { + public Location AsLocation() => Location.Create(FilePath, TextSpan, LinePositionSpan); + + public static LocationInfo From(ISymbol symbol) + { + var location = symbol.Locations[0]; + var lineSpan = location.GetLineSpan().Span; + var filePath = location.SourceTree.FilePath; + var textSpan = location.SourceSpan; + + return new LocationInfo(lineSpan, filePath, textSpan); + } + } +} From cab2abf6d3139fde9531fd8766d29b06cc73e198 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Fri, 26 May 2023 11:24:38 -0700 Subject: [PATCH 04/16] wip --- .../gen/JSImportGenerator/Comparers.cs | 8 ++--- .../JSImportGenerator/GeneratorDiagnostics.cs | 4 +-- .../JSImportGenerator/JSExportGenerator.cs | 12 ++++---- .../JSImportGenerator/JSImportGenerator.cs | 12 ++++---- .../gen/ComInterfaceGenerator/LocationInfo.cs | 29 ------------------- 5 files changed, 18 insertions(+), 47 deletions(-) delete mode 100644 src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Comparers.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Comparers.cs index 495deb4638662f..f27af1ccd55645 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Comparers.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Comparers.cs @@ -15,11 +15,11 @@ internal static class Comparers /// /// Comparer for an individual generated stub source as a syntax tree and the generated diagnostics for the stub. /// - public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); - public static readonly IEqualityComparer<(MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray)> GeneratedSyntax4 = - new CustomValueTupleElementComparer>( + public static readonly IEqualityComparer<(MemberDeclarationSyntax Syntax, ImmutableArray Diagnostics)> GeneratedSyntax = new CustomValueTupleElementComparer>(SyntaxEquivalentComparer.Instance, new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); + public static readonly IEqualityComparer<(MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray)> GeneratedSyntax4 = + new CustomValueTupleElementComparer>( SyntaxEquivalentComparer.Instance, SyntaxEquivalentComparer.Instance, SyntaxEquivalentComparer.Instance, - new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); + new ImmutableArraySequenceEqualComparer(EqualityComparer.Default)); } /// diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs index fea0a917cf5b1e..de94b76e673e9c 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs @@ -28,9 +28,9 @@ public class Ids } private const string Category = "JSImportGenerator"; - private readonly List _diagnostics = new List(); + private readonly List _diagnostics = new List(); - public IEnumerable Diagnostics => _diagnostics; + public IEnumerable Diagnostics => _diagnostics; public void ReportInvalidMarshallingAttributeInfo( AttributeData attributeData, diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSExportGenerator.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSExportGenerator.cs index 5f04c978a0289a..f89ab70d4535ee 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSExportGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSExportGenerator.cs @@ -25,7 +25,7 @@ internal sealed record IncrementalStubGenerationContext( MethodSignatureDiagnosticLocations DiagnosticLocation, JSExportData JSExportData, MarshallingGeneratorFactoryKey<(TargetFramework TargetFramework, Version TargetFrameworkVersion, JSGeneratorOptions)> GeneratorFactoryKey, - SequenceEqualImmutableArray Diagnostics); + SequenceEqualImmutableArray Diagnostics); public static class StepNames { @@ -69,13 +69,13 @@ public void Initialize(IncrementalGeneratorInitializationContext context) if (data.Right.IsEmpty // no attributed methods || data.Left.Compilation.Options is CSharpCompilationOptions { AllowUnsafe: true }) // Unsafe code enabled { - return ImmutableArray.Empty; + return ImmutableArray.Empty; } - return ImmutableArray.Create(Diagnostic.Create(GeneratorDiagnostics.JSExportRequiresAllowUnsafeBlocks, null)); + return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.JSExportRequiresAllowUnsafeBlocks, null)); })); - IncrementalValuesProvider<(MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate + IncrementalValuesProvider<(MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate .Combine(stubEnvironment) .Combine(stubOptions) .Select(static (data, ct) => new @@ -214,7 +214,7 @@ private static IncrementalStubGenerationContext CalculateStubInformation( new MethodSignatureDiagnosticLocations(originalSyntax), jsExportData, CreateGeneratorFactory(environment, options), - new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray())); + new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray())); } private static MarshallingGeneratorFactoryKey<(TargetFramework, Version, JSGeneratorOptions)> CreateGeneratorFactory(StubEnvironment env, JSGeneratorOptions options) @@ -286,7 +286,7 @@ private static NamespaceDeclarationSyntax GenerateRegSource( return ns; } - private static (MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray) GenerateSource( + private static (MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray) GenerateSource( IncrementalStubGenerationContext incrementalContext) { var diagnostics = new GeneratorDiagnostics(); diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.cs index f4519ac0039d95..32214ca1b7aa25 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.cs @@ -25,7 +25,7 @@ internal sealed record IncrementalStubGenerationContext( MethodSignatureDiagnosticLocations DiagnosticLocation, JSImportData JSImportData, MarshallingGeneratorFactoryKey<(TargetFramework TargetFramework, Version TargetFrameworkVersion, JSGeneratorOptions)> GeneratorFactoryKey, - SequenceEqualImmutableArray Diagnostics); + SequenceEqualImmutableArray Diagnostics); public static class StepNames { @@ -69,13 +69,13 @@ public void Initialize(IncrementalGeneratorInitializationContext context) if (data.Right.IsEmpty // no attributed methods || data.Left.Compilation.Options is CSharpCompilationOptions { AllowUnsafe: true }) // Unsafe code enabled { - return ImmutableArray.Empty; + return ImmutableArray.Empty; } - return ImmutableArray.Create(Diagnostic.Create(GeneratorDiagnostics.JSImportRequiresAllowUnsafeBlocks, null)); + return ImmutableArray.Create(DiagnosticInfo.Create(GeneratorDiagnostics.JSImportRequiresAllowUnsafeBlocks, null)); })); - IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate + IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray)> generateSingleStub = methodsToGenerate .Combine(stubEnvironment) .Combine(stubOptions) .Select(static (data, ct) => new @@ -201,7 +201,7 @@ private static IncrementalStubGenerationContext CalculateStubInformation( new MethodSignatureDiagnosticLocations(originalSyntax), jsImportData, CreateGeneratorFactory(environment, options), - new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray())); + new SequenceEqualImmutableArray(generatorDiagnostics.Diagnostics.ToImmutableArray())); } private static MarshallingGeneratorFactoryKey<(TargetFramework, Version, JSGeneratorOptions)> CreateGeneratorFactory(StubEnvironment env, JSGeneratorOptions options) @@ -211,7 +211,7 @@ private static IncrementalStubGenerationContext CalculateStubInformation( return MarshallingGeneratorFactoryKey.Create((env.TargetFramework, env.TargetFrameworkVersion, options), jsGeneratorFactory); } - private static (MemberDeclarationSyntax, ImmutableArray) GenerateSource( + private static (MemberDeclarationSyntax, ImmutableArray) GenerateSource( IncrementalStubGenerationContext incrementalContext) { var diagnostics = new GeneratorDiagnostics(); diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs deleted file mode 100644 index 982e1ca75bc6ab..00000000000000 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/LocationInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Text; - -namespace Microsoft.Interop -{ - /// - /// Contains data required to reconstruct a without keeping any symbols or references to a - /// - internal sealed record LocationInfo( - LinePositionSpan LinePositionSpan, - string FilePath, - TextSpan TextSpan) - { - public Location AsLocation() => Location.Create(FilePath, TextSpan, LinePositionSpan); - - public static LocationInfo From(ISymbol symbol) - { - var location = symbol.Locations[0]; - var lineSpan = location.GetLineSpan().Span; - var filePath = location.SourceTree.FilePath; - var textSpan = location.SourceSpan; - - return new LocationInfo(lineSpan, filePath, textSpan); - } - } -} From 7319660bebcb56ba15fb1ea2640bce15f2028ab5 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Fri, 26 May 2023 16:52:04 -0700 Subject: [PATCH 05/16] Use Location and revert csprojs --- eng/generators.targets | 3 +- .../InjectResource/InjectResource.csproj | 1 - .../Microsoft.NET.WebAssembly.Webcil.csproj | 1 - .../ComInterfaceContext.cs | 2 +- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 4 +- .../ComInterfaceGenerator/ComMethodInfo.cs | 4 +- .../GeneratorDiagnostics.cs | 27 ++++++++++++- .../CustomMarshallerAttributeFixer.cs | 2 +- .../Analyzers/DiagnosticReporter.cs | 2 +- .../GeneratorDiagnostics.cs | 2 +- .../DiagnosticInfo.cs | 32 ++++++++++++---- .../IGeneratorDiagnostics.cs | 30 +++++++-------- .../LocationInfo.cs | 38 ------------------- .../MethodSignatureDiagnosticLocations.cs | 2 +- .../AndroidAppBuilder.csproj | 1 - .../AotCompilerTask/MonoAOTCompiler.csproj | 1 - .../AppleAppBuilder/AppleAppBuilder.csproj | 1 - .../AssemblyStripper/AssemblyStripper.csproj | 1 - .../WorkloadBuildTasks.csproj | 1 - .../installer.tasks/installer.tasks.csproj | 1 - 20 files changed, 75 insertions(+), 81 deletions(-) delete mode 100644 src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs diff --git a/eng/generators.targets b/eng/generators.targets index 6edfa3e6bd77fa..f14c60183a312a 100644 --- a/eng/generators.targets +++ b/eng/generators.targets @@ -46,8 +46,7 @@ diff --git a/src/coreclr/tools/InjectResource/InjectResource.csproj b/src/coreclr/tools/InjectResource/InjectResource.csproj index 99ed76794b89d6..f8537a0cb11d58 100644 --- a/src/coreclr/tools/InjectResource/InjectResource.csproj +++ b/src/coreclr/tools/InjectResource/InjectResource.csproj @@ -9,7 +9,6 @@ false $(RuntimeBinDir)\InjectResource false - false diff --git a/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj b/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj index 6c77b31ea8e4ef..6c66737e5535d2 100644 --- a/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj +++ b/src/libraries/Microsoft.NET.WebAssembly.Webcil/src/Microsoft.NET.WebAssembly.Webcil.csproj @@ -6,7 +6,6 @@ true true false - false diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 73905d58816ea7..f8184a0b3fefcf 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -59,7 +59,7 @@ DiagnosticOr AddContext(ComInterfaceInfo iface) var diagnostic = DiagnosticOr.From( DiagnosticInfo.Create( GeneratorDiagnostics.BaseInterfaceIsNotGenerated, - iface.DiagnosticLocation.AsLocation(), iface.ThisInterfaceKey, iface.BaseInterfaceKey)); + iface.DiagnosticLocation, iface.ThisInterfaceKey, iface.BaseInterfaceKey)); nameToContextCache[iface.ThisInterfaceKey] = diagnostic; return diagnostic; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 987125ac75a840..9faa09c07e96c4 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -25,7 +25,7 @@ internal sealed record ComInterfaceInfo( ContainingSyntaxContext TypeDefinitionContext, ContainingSyntax ContainingSyntax, Guid InterfaceId, - LocationInfo DiagnosticLocation) + Location DiagnosticLocation) { public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, CancellationToken _) { @@ -77,7 +77,7 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD new ContainingSyntaxContext(syntax), new ContainingSyntax(syntax.Modifiers, syntax.Kind(), syntax.Identifier, syntax.TypeParameterList), guid ?? Guid.Empty, - LocationInfo.FromSymbol(symbol)), + symbol.Locations[0]), symbol)); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs index 27f2fdc4fe87aa..d15b85fb90dc7e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs @@ -68,8 +68,8 @@ private static bool IsComMethodCandidate(ISymbol member) // [GeneratedComInterface] attribute. // This restriction not only makes finding the syntax for a given method cheaper, // but it also enables us to ensure that we can determine vtable method order easily. - Location interfaceLocation = ifaceContext.Declaration.GetLocation(); - Location? methodLocationInAttributedInterfaceDeclaration = null; + CodeAnalysis.Location interfaceLocation = ifaceContext.Declaration.GetLocation(); + CodeAnalysis.Location? methodLocationInAttributedInterfaceDeclaration = null; foreach (var methodLocation in method.Locations) { if (methodLocation.SourceTree == interfaceLocation.SourceTree diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index 59be062df25c92..12935fb41dd3b9 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -29,6 +29,7 @@ public class Ids private const string Category = "ComInterfaceGenerator"; + /// public static readonly DiagnosticDescriptor InvalidAttributedMethodSignature = new DiagnosticDescriptor( Ids.InvalidLibraryImportAttributeUsage, @@ -39,6 +40,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidAttributedMethodDescription))); + /// public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingModifiers = new DiagnosticDescriptor( Ids.InvalidLibraryImportAttributeUsage, @@ -49,6 +51,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidAttributedMethodDescription))); + /// public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute = new DiagnosticDescriptor( Ids.InvalidLibraryImportAttributeUsage, @@ -59,6 +62,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidAttributedMethodDescription))); + /// public static readonly DiagnosticDescriptor InvalidStringMarshallingMismatchBetweenBaseAndDerived = new DiagnosticDescriptor( Ids.InvalidGeneratedComInterfaceAttributeUsage, @@ -69,6 +73,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.GeneratedComInterfaceStringMarshallingMustMatchBase))); + /// public static readonly DiagnosticDescriptor InvalidStringMarshallingConfigurationOnMethod = new DiagnosticDescriptor( Ids.InvalidLibraryImportAttributeUsage, @@ -79,6 +84,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidStringMarshallingConfigurationDescription))); + /// public static readonly DiagnosticDescriptor InvalidStringMarshallingConfigurationOnInterface = new DiagnosticDescriptor( Ids.InvalidGeneratedComInterfaceAttributeUsage, @@ -89,6 +95,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidStringMarshallingConfigurationDescription))); + /// public static readonly DiagnosticDescriptor InvalidExceptionMarshallingConfiguration = new DiagnosticDescriptor( Ids.InvalidLibraryImportAttributeUsage, @@ -99,16 +106,18 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidExceptionMarshallingConfigurationDescription))); + /// public static readonly DiagnosticDescriptor ParameterTypeNotSupported = new DiagnosticDescriptor( Ids.TypeNotSupported, GetResourceString(nameof(SR.TypeNotSupportedTitle)), - GetResourceString(nameof(SR.TypeNotSupportedMessageParameter)), + GetResourceString(nameof(SR.InvalidExceptionMarshallingConfigurationMessage)), Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: GetResourceString(nameof(SR.TypeNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ReturnTypeNotSupported = new DiagnosticDescriptor( Ids.TypeNotSupported, @@ -119,6 +128,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.TypeNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = new DiagnosticDescriptor( Ids.TypeNotSupported, @@ -129,6 +139,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.TypeNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = new DiagnosticDescriptor( Ids.TypeNotSupported, @@ -139,6 +150,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.TypeNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = new DiagnosticDescriptor( Ids.ConfigurationNotSupported, @@ -149,6 +161,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.ConfigurationNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = new DiagnosticDescriptor( Ids.ConfigurationNotSupported, @@ -159,6 +172,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.ConfigurationNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ConfigurationNotSupported = new DiagnosticDescriptor( Ids.ConfigurationNotSupported, @@ -169,6 +183,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.ConfigurationNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = new DiagnosticDescriptor( Ids.ConfigurationNotSupported, @@ -179,6 +194,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.ConfigurationNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = new DiagnosticDescriptor( Ids.ConfigurationNotSupported, @@ -189,6 +205,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.ConfigurationNotSupportedDescription))); + /// public static readonly DiagnosticDescriptor MethodNotDeclaredInAttributedInterface = new DiagnosticDescriptor( Ids.MethodNotDeclaredInAttributedInterface, @@ -199,6 +216,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.MethodNotDeclaredInAttributedInterfaceDescription))); + /// public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingGuidAttribute = new DiagnosticDescriptor( Ids.InvalidGeneratedComInterfaceAttributeUsage, @@ -209,6 +227,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageDescription))); + /// public static readonly DiagnosticDescriptor InvalidAttributedInterfaceGenericNotSupported = new DiagnosticDescriptor( Ids.InvalidGeneratedComInterfaceAttributeUsage, @@ -219,6 +238,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageDescription))); + /// public static readonly DiagnosticDescriptor MultipleComInterfaceBaseTypes = new DiagnosticDescriptor( Ids.MultipleComInterfaceBaseTypes, @@ -229,6 +249,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.MultipleComInterfaceBaseTypesDescription))); + /// public static readonly DiagnosticDescriptor CannotAnalyzeMethodPattern = new DiagnosticDescriptor( Ids.AnalysisFailed, @@ -239,6 +260,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.AnalysisFailedDescription))); + /// public static readonly DiagnosticDescriptor CannotAnalyzeInterfacePattern = new DiagnosticDescriptor( Ids.AnalysisFailed, @@ -249,6 +271,7 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.AnalysisFailedDescription))); + /// public static readonly DiagnosticDescriptor BaseInterfaceIsNotGenerated = new DiagnosticDescriptor( Ids.BaseInterfaceFailedGeneration, @@ -339,7 +362,7 @@ public void ReportMarshallingNotSupported( TypePositionInfo info, string? notSupportedDetails) { - Location diagnosticLocation = Location.None; + CodeAnalysis.Location diagnosticLocation = CodeAnalysis.Location.None; string elementName = string.Empty; if (info.IsManagedReturnPosition) diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs index f3591046715427..cf78e8af6065ab 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs @@ -184,7 +184,7 @@ private static async Task AddMissingMembers(Document doc, SyntaxNode n // Get the managed type from the CustomMarshallerAttribute located at the provided location in source on the provided type. // As we only get fixable diagnostics for types that have valid non-null managed types in the CustomMarshallerAttribute applications, // we do not need to worry about the returned symbol being null. - private static ITypeSymbol GetManagedTypeInAttributeSyntax(Location locationInAttribute, INamedTypeSymbol attributedTypeSymbol) + private static ITypeSymbol GetManagedTypeInAttributeSyntax(CodeAnalysis.Location locationInAttribute, INamedTypeSymbol attributedTypeSymbol) => (ITypeSymbol)attributedTypeSymbol.GetAttributes().First(attr => attr.ApplicationSyntaxReference.SyntaxTree == locationInAttribute.SourceTree && attr.ApplicationSyntaxReference.Span.Contains(locationInAttribute.SourceSpan)).ConstructorArguments[0].Value!; diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs index d1534f58203b5d..84d96f406245ed 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs @@ -16,7 +16,7 @@ public DiagnosticReporter(Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnostic(descriptor, properties, args).ToDiagnostic())); + public static DiagnosticReporter CreateForLocation(CodeAnalysis.Location location, Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnostic(descriptor, properties, args).ToDiagnostic())); public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, params object[] messageArgs) => _diagnosticFactory(descriptor, ImmutableDictionary.Empty, messageArgs); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs index e8ca2e5cd83cc5..8e1bfde16d48f4 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs @@ -231,7 +231,7 @@ public void ReportMarshallingNotSupported( string? notSupportedDetails, ImmutableDictionary diagnosticProperties) { - Location diagnosticLocation = Location.None; + CodeAnalysis.Location diagnosticLocation = CodeAnalysis.Location.None; string elementName = string.Empty; if (info.IsManagedReturnPosition) diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs index 851ea5cc6ef17b..91072e62795dbc 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticInfo.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using Microsoft.CodeAnalysis; @@ -11,32 +13,48 @@ public record DiagnosticInfo { public required DiagnosticDescriptor Descriptor { get; init; } public required SequenceEqualImmutableArray MessageArgs { get; init; } - public required LocationInfo? Location { get; init; } + public required Location? Location { get; init; } + public required IEnumerable? AdditionalLocations { get; init; } public required ValueEqualityImmutableDictionary? Properties { get; init; } public Diagnostic ToDiagnostic() => Diagnostic.Create( Descriptor, - Location.AsLocation(), + Location, + additionalLocations: AdditionalLocations, properties: Properties?.Map, - messageArgs: MessageArgs); + messageArgs: MessageArgs.Array.ToArray()); - public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, params object?[] messageArgs) + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, CodeAnalysis.Location location, params object?[] messageArgs) { return new DiagnosticInfo() { Descriptor = descriptor, - Location = LocationInfo.FromLocation(location), + Location = location, + AdditionalLocations = null, Properties = null, + MessageArgs = messageArgs.Select(o => o?.ToString()).ToSequenceEqualImmutableArray() + }; + } + + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, CodeAnalysis.Location location, ImmutableDictionary? properties, params object?[] messageArgs) + { + return new DiagnosticInfo() + { + Descriptor = descriptor, + Location = location, + AdditionalLocations = null, + Properties = properties.ToValueEquals(), MessageArgs = messageArgs.Select(o => o.ToString()).ToSequenceEqualImmutableArray() }; } - public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, ImmutableDictionary? properties, params object?[] messageArgs) + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, CodeAnalysis.Location location, IEnumerable? additionalLocations, ImmutableDictionary? properties, params object?[] messageArgs) { return new DiagnosticInfo() { Descriptor = descriptor, - Location = LocationInfo.FromLocation(location), + Location = location, + AdditionalLocations = additionalLocations, Properties = properties.ToValueEquals(), MessageArgs = messageArgs.Select(o => o.ToString()).ToSequenceEqualImmutableArray() }; diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs index 65c93b6915f286..85f72a615888f2 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs @@ -36,9 +36,9 @@ public static DiagnosticInfo CreateDiagnostic( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - Location location = syntaxReference is not null + CodeAnalysis.Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : Location.None; + : CodeAnalysis.Location.None; return location.CreateDiagnostic(descriptor, args); } @@ -50,15 +50,15 @@ public static DiagnosticInfo CreateDiagnostic( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - Location location = syntaxReference is not null + CodeAnalysis.Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : Location.None; + : CodeAnalysis.Location.None; return location.CreateDiagnostic(descriptor, properties, args); } public static DiagnosticInfo CreateDiagnostic( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, params object[] args) { @@ -66,14 +66,14 @@ public static DiagnosticInfo CreateDiagnostic( } public static DiagnosticInfo CreateDiagnostic( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { - Location firstLocation = null; - List additionalLocations = null; - foreach (Location location in locations) + CodeAnalysis.Location firstLocation = null; + List additionalLocations = null; + foreach (CodeAnalysis.Location location in locations) { if (location.IsInSource) { @@ -89,30 +89,30 @@ public static DiagnosticInfo CreateDiagnostic( } return firstLocation is null ? - DiagnosticInfo.Create(descriptor, Location.None, properties: properties, args) : - DiagnosticInfo.Create(descriptor, firstLocation, additionalLocations, properties, args); + DiagnosticInfo.Create(descriptor, CodeAnalysis.Location.None, properties: properties, args) : + DiagnosticInfo.Create(descriptor, firstLocation, additionalLocations: additionalLocations, properties: properties, messageArgs: args); } public static DiagnosticInfo CreateDiagnostic( - this Location location, + this CodeAnalysis.Location location, DiagnosticDescriptor descriptor, params object[] args) { return DiagnosticInfo.Create( descriptor, - location: location.IsInSource ? location : Location.None, + location: location.IsInSource ? location : CodeAnalysis.Location.None, messageArgs: args); } public static DiagnosticInfo CreateDiagnostic( - this Location location, + this CodeAnalysis.Location location, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { return DiagnosticInfo.Create( descriptor, - location: location.IsInSource ? location : Location.None, + location: location.IsInSource ? location : CodeAnalysis.Location.None, properties: properties, messageArgs: args); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs deleted file mode 100644 index 7dfbacf48c396f..00000000000000 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/LocationInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Text; - -namespace Microsoft.Interop -{ - /// - /// Contains data required to reconstruct a without keeping any symbols or references to a - /// - public sealed record LocationInfo - { - public required LinePositionSpan LinePositionSpan { get; init; } - public required string FilePath { get; init; } - public required TextSpan TextSpan { get; init; } - public Location AsLocation() => Location.Create(FilePath, TextSpan, LinePositionSpan); - - public static LocationInfo FromSymbol(ISymbol symbol) - { - var location = symbol.Locations[0]; - return FromLocation(location); - } - - public static LocationInfo FromLocation(Location location) - { - var lineSpan = location.GetLineSpan().Span; - var filePath = location.SourceTree.FilePath; - var textSpan = location.SourceSpan; - return new LocationInfo() - { - LinePositionSpan = lineSpan, - FilePath = filePath, - TextSpan = textSpan - }; - } - } -} diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MethodSignatureDiagnosticLocations.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MethodSignatureDiagnosticLocations.cs index 80607c56687224..3295ec367cb30d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MethodSignatureDiagnosticLocations.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MethodSignatureDiagnosticLocations.cs @@ -9,7 +9,7 @@ namespace Microsoft.Interop { - public sealed record MethodSignatureDiagnosticLocations(string MethodIdentifier, ImmutableArray ManagedParameterLocations, Location FallbackLocation) + public sealed record MethodSignatureDiagnosticLocations(string MethodIdentifier, ImmutableArray ManagedParameterLocations, CodeAnalysis.Location FallbackLocation) { public MethodSignatureDiagnosticLocations(MethodDeclarationSyntax syntax) : this(syntax.Identifier.Text, syntax.ParameterList.Parameters.Select(p => p.Identifier.GetLocation()).ToImmutableArray(), syntax.Identifier.GetLocation()) diff --git a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj index 26f8511e93e043..2481e55817915c 100644 --- a/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj +++ b/src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj @@ -6,7 +6,6 @@ false enable $(NoWarn),CA1050,CA1850 - false diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj index dbed91bbb503de..e76730b5aeca07 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj @@ -10,7 +10,6 @@ $(NoWarn),CS8604,CS8602 true - false diff --git a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj index f8b7abb191b0bf..233333c8dcd15a 100644 --- a/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj +++ b/src/tasks/AppleAppBuilder/AppleAppBuilder.csproj @@ -6,7 +6,6 @@ false enable $(NoWarn),CA1050,CA1850 - false diff --git a/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj b/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj index 5f8a4c625e7a32..2eb8a61b6330fb 100644 --- a/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj +++ b/src/tasks/MonoTargetsTasks/ILStrip/AssemblyStripper/AssemblyStripper.csproj @@ -10,7 +10,6 @@ $(NoWarn),CS0618,CS0649,SYSLIB0003,SYSLIB0037 false - false diff --git a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj index 39c3fcce95d210..fbb13d8d9c4ecf 100644 --- a/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj +++ b/src/tasks/WorkloadBuildTasks/WorkloadBuildTasks.csproj @@ -3,7 +3,6 @@ $(TargetFrameworkForNETCoreTasks) enable $(NoWarn),CA1050,CA1850 - false diff --git a/src/tasks/installer.tasks/installer.tasks.csproj b/src/tasks/installer.tasks/installer.tasks.csproj index 83b855b2301b8f..98c370fdfedb13 100644 --- a/src/tasks/installer.tasks/installer.tasks.csproj +++ b/src/tasks/installer.tasks/installer.tasks.csproj @@ -3,7 +3,6 @@ $(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent) false false - false From 094a59333f1e567f6a4344c5a02e48025b32fb1e Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Tue, 30 May 2023 14:21:32 -0700 Subject: [PATCH 06/16] Re-add the old Diagnostic APIs to Microsoft.Interop.SourceGeneration --- .../JSImportGenerator/GeneratorDiagnostics.cs | 18 +-- .../GeneratedComInterfaceAttributeAnalyzer.cs | 2 +- .../GeneratorDiagnostics.cs | 22 ++-- .../ConvertToLibraryImportAnalyzer.cs | 2 +- .../Analyzers/DiagnosticReporter.cs | 2 +- .../GeneratorDiagnostics.cs | 20 +-- .../IGeneratorDiagnostics.cs | 124 ++++++++++++++++-- ...eneratorInitializationContextExtensions.cs | 8 ++ 8 files changed, 153 insertions(+), 45 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs index de94b76e673e9c..1cd066f0d9255b 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/GeneratorDiagnostics.cs @@ -38,7 +38,7 @@ public void ReportInvalidMarshallingAttributeInfo( params string[] reasonArgs) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, new LocalizableResourceString(reasonResourceName, SR.ResourceManager, typeof(FxResources.Microsoft.Interop.JavaScript.JSImportGenerator.SR), reasonArgs))); } @@ -57,14 +57,14 @@ public void ReportConfigurationNotSupported( if (unsupportedValue == null) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationNotSupported, configurationName)); } else { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationValueNotSupported, unsupportedValue, configurationName)); @@ -104,7 +104,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, diagnosticProperties, notSupportedDetails!, @@ -113,7 +113,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, diagnosticProperties, notSupportedDetails!, @@ -128,7 +128,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnConfigurationNotSupported, diagnosticProperties, nameof(System.Runtime.InteropServices.MarshalAsAttribute), @@ -137,7 +137,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterConfigurationNotSupported, diagnosticProperties, nameof(System.Runtime.InteropServices.MarshalAsAttribute), @@ -150,7 +150,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupported, diagnosticProperties, info.ManagedType.DiagnosticFormattedName, @@ -159,7 +159,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupported, diagnosticProperties, info.ManagedType.DiagnosticFormattedName, diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs index f27a17f3595eeb..9779d1e9287d4e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Analyzers/GeneratedComInterfaceAttributeAnalyzer.cs @@ -41,7 +41,7 @@ public override void Initialize(AnalysisContext context) && GetAttribute(typeSymbol, TypeNames.InterfaceTypeAttribute, out AttributeData? comInterfaceAttribute) && !InterfaceTypeAttributeIsSupported(comInterfaceAttribute, out string unsupportedValue)) { - context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic()); + context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(AnalyzerDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic()); } }, SymbolKind.NamedType); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index 12935fb41dd3b9..f02a6c209963bf 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -299,7 +299,7 @@ public void ReportInvalidStringMarshallingConfiguration( string detailsMessage) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnMethod, methodName, detailsMessage)); @@ -317,7 +317,7 @@ public void ReportInvalidExceptionMarshallingConfiguration( string detailsMessage) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.InvalidExceptionMarshallingConfiguration, methodName, detailsMessage)); @@ -337,14 +337,14 @@ public void ReportConfigurationNotSupported( if (unsupportedValue == null) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationNotSupported, configurationName)); } else { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationValueNotSupported, unsupportedValue, configurationName)); @@ -383,7 +383,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, notSupportedDetails!, elementName)); @@ -391,7 +391,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, notSupportedDetails!, elementName)); @@ -405,7 +405,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnConfigurationNotSupported, nameof(System.Runtime.InteropServices.MarshalAsAttribute), elementName)); @@ -413,7 +413,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterConfigurationNotSupported, nameof(System.Runtime.InteropServices.MarshalAsAttribute), elementName)); @@ -425,7 +425,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupported, info.ManagedType.DiagnosticFormattedName, elementName)); @@ -433,7 +433,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupported, info.ManagedType.DiagnosticFormattedName, elementName)); @@ -447,7 +447,7 @@ public void ReportInvalidMarshallingAttributeInfo( params string[] reasonArgs) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, new LocalizableResourceString(reasonResourceName, SR.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR), reasonArgs))); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs index 62d1dfdc265162..03a8141eb50a33 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs @@ -136,7 +136,7 @@ private static void AnalyzeSymbol(SymbolAnalysisContext context, INamedTypeSymbo properties.Add(ExactSpelling, dllImportData.ExactSpelling.ToString()); properties.Add(MayRequireAdditionalWork, mayRequireAdditionalWork.ToString()); - context.ReportDiagnostic(method.CreateDiagnostic(ConvertToLibraryImport, properties.ToImmutable(), method.Name).ToDiagnostic()); + context.ReportDiagnostic(method.CreateDiagnosticInfo(ConvertToLibraryImport, properties.ToImmutable(), method.Name).ToDiagnostic()); } private static bool HasUnsupportedMarshalAsInfo(TypePositionInfo info) diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs index 84d96f406245ed..b128616d8f5340 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/DiagnosticReporter.cs @@ -16,7 +16,7 @@ public DiagnosticReporter(Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnostic(descriptor, properties, args).ToDiagnostic())); + public static DiagnosticReporter CreateForLocation(CodeAnalysis.Location location, Action reportDiagnostic) => new((descriptor, properties, args) => reportDiagnostic(location.CreateDiagnosticInfo(descriptor, properties, args).ToDiagnostic())); public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, params object[] messageArgs) => _diagnosticFactory(descriptor, ImmutableDictionary.Empty, messageArgs); diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs index 8e1bfde16d48f4..10546870f1eec8 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs @@ -185,7 +185,7 @@ public void ReportInvalidStringMarshallingConfiguration( string detailsMessage) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.InvalidStringMarshallingConfiguration, methodName, detailsMessage)); @@ -205,14 +205,14 @@ public void ReportConfigurationNotSupported( if (unsupportedValue == null) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationNotSupported, configurationName)); } else { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.ConfigurationValueNotSupported, unsupportedValue, configurationName)); @@ -252,7 +252,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails, diagnosticProperties, notSupportedDetails!, @@ -261,7 +261,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, diagnosticProperties, notSupportedDetails!, @@ -276,7 +276,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnConfigurationNotSupported, diagnosticProperties, nameof(System.Runtime.InteropServices.MarshalAsAttribute), @@ -285,7 +285,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterConfigurationNotSupported, diagnosticProperties, nameof(System.Runtime.InteropServices.MarshalAsAttribute), @@ -298,7 +298,7 @@ public void ReportMarshallingNotSupported( if (info.IsManagedReturnPosition) { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ReturnTypeNotSupported, diagnosticProperties, info.ManagedType.DiagnosticFormattedName, @@ -307,7 +307,7 @@ public void ReportMarshallingNotSupported( else { _diagnostics.Add( - diagnosticLocation.CreateDiagnostic( + diagnosticLocation.CreateDiagnosticInfo( GeneratorDiagnostics.ParameterTypeNotSupported, diagnosticProperties, info.ManagedType.DiagnosticFormattedName, @@ -322,7 +322,7 @@ public void ReportInvalidMarshallingAttributeInfo( params string[] reasonArgs) { _diagnostics.Add( - attributeData.CreateDiagnostic( + attributeData.CreateDiagnosticInfo( GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported, new LocalizableResourceString(reasonResourceName, SR.ResourceManager, typeof(FxResources.Microsoft.Interop.LibraryImportGenerator.SR), reasonArgs))); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs index 85f72a615888f2..a2217fa68b6e67 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs @@ -1,19 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Collections.Generic; using System.Collections.Immutable; -using System.Diagnostics; - using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; namespace Microsoft.Interop { public static class DiagnosticExtensions { - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( this ISymbol symbol, DiagnosticDescriptor descriptor, params object[] args) @@ -21,7 +17,7 @@ public static DiagnosticInfo CreateDiagnostic( return symbol.Locations.CreateDiagnostic(descriptor, args); } - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( this ISymbol symbol, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -30,7 +26,7 @@ public static DiagnosticInfo CreateDiagnostic( return symbol.Locations.CreateDiagnostic(descriptor, properties, args); } - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( this AttributeData attributeData, DiagnosticDescriptor descriptor, params object[] args) @@ -43,7 +39,7 @@ public static DiagnosticInfo CreateDiagnostic( return location.CreateDiagnostic(descriptor, args); } - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( this AttributeData attributeData, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -57,7 +53,7 @@ public static DiagnosticInfo CreateDiagnostic( return location.CreateDiagnostic(descriptor, properties, args); } - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( this ImmutableArray locations, DiagnosticDescriptor descriptor, params object[] args) @@ -65,7 +61,111 @@ public static DiagnosticInfo CreateDiagnostic( return CreateDiagnostic(locations, descriptor, properties: null, args); } - public static DiagnosticInfo CreateDiagnostic( + public static Diagnostic CreateDiagnostic( + this ImmutableArray locations, + DiagnosticDescriptor descriptor, + ImmutableDictionary properties, + params object[] args) + { + CodeAnalysis.Location firstLocation = null; + List additionalLocations = null; + foreach (CodeAnalysis.Location location in locations) + { + if (location.IsInSource) + { + if (firstLocation is null) + { + firstLocation = location; + } + else + { + (additionalLocations ??= new()).Add(location); + } + } + } + + return firstLocation is null ? + Diagnostic.Create(descriptor, CodeAnalysis.Location.None, properties: properties, args) : + Diagnostic.Create(descriptor, firstLocation, additionalLocations: additionalLocations, properties: properties, messageArgs: args); + } + + public static Diagnostic CreateDiagnostic( + this CodeAnalysis.Location location, + DiagnosticDescriptor descriptor, + params object[] args) + { + return Diagnostic.Create( + descriptor, + location: location.IsInSource ? location : CodeAnalysis.Location.None, + messageArgs: args); + } + + public static Diagnostic CreateDiagnostic( + this CodeAnalysis.Location location, + DiagnosticDescriptor descriptor, + ImmutableDictionary properties, + params object[] args) + { + return Diagnostic.Create( + descriptor, + location: location.IsInSource ? location : CodeAnalysis.Location.None, + properties: properties, + messageArgs: args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( + this ISymbol symbol, + DiagnosticDescriptor descriptor, + params object[] args) + { + return symbol.Locations.CreateDiagnosticInfo(descriptor, args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( + this ISymbol symbol, + DiagnosticDescriptor descriptor, + ImmutableDictionary properties, + params object[] args) + { + return symbol.Locations.CreateDiagnosticInfo(descriptor, properties, args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( + this AttributeData attributeData, + DiagnosticDescriptor descriptor, + params object[] args) + { + SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; + CodeAnalysis.Location location = syntaxReference is not null + ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) + : CodeAnalysis.Location.None; + + return location.CreateDiagnosticInfo(descriptor, args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( + this AttributeData attributeData, + DiagnosticDescriptor descriptor, + ImmutableDictionary properties, + params object[] args) + { + SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; + CodeAnalysis.Location location = syntaxReference is not null + ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) + : CodeAnalysis.Location.None; + + return location.CreateDiagnosticInfo(descriptor, properties, args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( + this ImmutableArray locations, + DiagnosticDescriptor descriptor, + params object[] args) + { + return CreateDiagnosticInfo(locations, descriptor, properties: null, args); + } + + public static DiagnosticInfo CreateDiagnosticInfo( this ImmutableArray locations, DiagnosticDescriptor descriptor, ImmutableDictionary properties, @@ -93,7 +193,7 @@ public static DiagnosticInfo CreateDiagnostic( DiagnosticInfo.Create(descriptor, firstLocation, additionalLocations: additionalLocations, properties: properties, messageArgs: args); } - public static DiagnosticInfo CreateDiagnostic( + public static DiagnosticInfo CreateDiagnosticInfo( this CodeAnalysis.Location location, DiagnosticDescriptor descriptor, params object[] args) @@ -104,7 +204,7 @@ public static DiagnosticInfo CreateDiagnostic( messageArgs: args); } - public static DiagnosticInfo CreateDiagnostic( + public static DiagnosticInfo CreateDiagnosticInfo( this CodeAnalysis.Location location, DiagnosticDescriptor descriptor, ImmutableDictionary properties, diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs index 4c323853d9415d..18ae8e90d58cd2 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalGeneratorInitializationContextExtensions.cs @@ -45,6 +45,14 @@ public static void RegisterDiagnostics(this IncrementalGeneratorInitializationCo }); } + public static void RegisterDiagnostics(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider diagnostics) + { + context.RegisterSourceOutput(diagnostics.Where(diag => diag is not null), (context, diagnostic) => + { + context.ReportDiagnostic(diagnostic); + }); + } + public static void RegisterConcatenatedSyntaxOutputs(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider nodes, string fileName) where TNode : SyntaxNode { From 68dac3b3e6fe4db83237bdb3988aace01eb023a8 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Wed, 31 May 2023 14:13:48 -0700 Subject: [PATCH 07/16] Don't qualify Location --- .../IGeneratorDiagnostics.cs | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs index a2217fa68b6e67..e620875eae719f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IGeneratorDiagnostics.cs @@ -32,9 +32,9 @@ public static Diagnostic CreateDiagnostic( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - CodeAnalysis.Location location = syntaxReference is not null + Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : CodeAnalysis.Location.None; + : Location.None; return location.CreateDiagnostic(descriptor, args); } @@ -46,15 +46,15 @@ public static Diagnostic CreateDiagnostic( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - CodeAnalysis.Location location = syntaxReference is not null + Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : CodeAnalysis.Location.None; + : Location.None; return location.CreateDiagnostic(descriptor, properties, args); } public static Diagnostic CreateDiagnostic( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, params object[] args) { @@ -62,14 +62,14 @@ public static Diagnostic CreateDiagnostic( } public static Diagnostic CreateDiagnostic( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { - CodeAnalysis.Location firstLocation = null; - List additionalLocations = null; - foreach (CodeAnalysis.Location location in locations) + Location firstLocation = null; + List additionalLocations = null; + foreach (Location location in locations) { if (location.IsInSource) { @@ -85,30 +85,30 @@ public static Diagnostic CreateDiagnostic( } return firstLocation is null ? - Diagnostic.Create(descriptor, CodeAnalysis.Location.None, properties: properties, args) : + Diagnostic.Create(descriptor, Location.None, properties: properties, args) : Diagnostic.Create(descriptor, firstLocation, additionalLocations: additionalLocations, properties: properties, messageArgs: args); } public static Diagnostic CreateDiagnostic( - this CodeAnalysis.Location location, + this Location location, DiagnosticDescriptor descriptor, params object[] args) { return Diagnostic.Create( descriptor, - location: location.IsInSource ? location : CodeAnalysis.Location.None, + location: location.IsInSource ? location : Location.None, messageArgs: args); } public static Diagnostic CreateDiagnostic( - this CodeAnalysis.Location location, + this Location location, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { return Diagnostic.Create( descriptor, - location: location.IsInSource ? location : CodeAnalysis.Location.None, + location: location.IsInSource ? location : Location.None, properties: properties, messageArgs: args); } @@ -136,9 +136,9 @@ public static DiagnosticInfo CreateDiagnosticInfo( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - CodeAnalysis.Location location = syntaxReference is not null + Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : CodeAnalysis.Location.None; + : Location.None; return location.CreateDiagnosticInfo(descriptor, args); } @@ -150,15 +150,15 @@ public static DiagnosticInfo CreateDiagnosticInfo( params object[] args) { SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; - CodeAnalysis.Location location = syntaxReference is not null + Location location = syntaxReference is not null ? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) - : CodeAnalysis.Location.None; + : Location.None; return location.CreateDiagnosticInfo(descriptor, properties, args); } public static DiagnosticInfo CreateDiagnosticInfo( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, params object[] args) { @@ -166,14 +166,14 @@ public static DiagnosticInfo CreateDiagnosticInfo( } public static DiagnosticInfo CreateDiagnosticInfo( - this ImmutableArray locations, + this ImmutableArray locations, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { - CodeAnalysis.Location firstLocation = null; - List additionalLocations = null; - foreach (CodeAnalysis.Location location in locations) + Location firstLocation = null; + List additionalLocations = null; + foreach (Location location in locations) { if (location.IsInSource) { @@ -189,30 +189,30 @@ public static DiagnosticInfo CreateDiagnosticInfo( } return firstLocation is null ? - DiagnosticInfo.Create(descriptor, CodeAnalysis.Location.None, properties: properties, args) : + DiagnosticInfo.Create(descriptor, Location.None, properties: properties, args) : DiagnosticInfo.Create(descriptor, firstLocation, additionalLocations: additionalLocations, properties: properties, messageArgs: args); } public static DiagnosticInfo CreateDiagnosticInfo( - this CodeAnalysis.Location location, + this Location location, DiagnosticDescriptor descriptor, params object[] args) { return DiagnosticInfo.Create( descriptor, - location: location.IsInSource ? location : CodeAnalysis.Location.None, + location: location.IsInSource ? location : Location.None, messageArgs: args); } public static DiagnosticInfo CreateDiagnosticInfo( - this CodeAnalysis.Location location, + this Location location, DiagnosticDescriptor descriptor, ImmutableDictionary properties, params object[] args) { return DiagnosticInfo.Create( descriptor, - location: location.IsInSource ? location : CodeAnalysis.Location.None, + location: location.IsInSource ? location : Location.None, properties: properties, messageArgs: args); } From c3041a2c5daae31808b55ebc2a29b273b52020c2 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Wed, 31 May 2023 14:23:51 -0700 Subject: [PATCH 08/16] wip --- .../Diagnostics/Reader/UnsafeNativeMethods.cs | 6 + .../ComInterfaceContext.cs | 24 +-- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 39 +++-- .../ComInterfaceGenerator/ComMethodInfo.cs | 14 +- .../GeneratedComInterfaceAttributeData.cs | 5 +- .../DiagnosticOr.cs | 141 ------------------ .../CompileFails.cs | 52 +++++++ 7 files changed, 106 insertions(+), 175 deletions(-) delete mode 100644 src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs index 21ce94d0c423f3..f29228af3280ed 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs @@ -477,6 +477,12 @@ internal static partial bool EvtNext( int timeout, int flags, ref int returned); + [LibraryImport("user32.dll", EntryPoint = "GetClassNameW", SetLastError = true)] + internal static partial int GetClassName(IntPtr hWnd, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2)] char[] lpClassName, int nMaxCount); + [LibraryImport(nameof(int))] + public static partial int CountArrayElements( + [MarshalUsing(typeof(ArrayMarshaller<,>))] int[] array, // Unlike the V1 system, we'll allow open generics in the V2 system in MarshalUsing since there's an extra generic parameter that the user does not provide. + out int numElements); [LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 54cfe877ec82e4..99a50f0f250a2f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -16,15 +16,15 @@ internal sealed record ComInterfaceContext(ComInterfaceInfo Info, ComInterfaceCo /// /// Takes a list of ComInterfaceInfo, and creates a list of ComInterfaceContext. /// - public static ImmutableArray> GetContexts(ImmutableArray data, CancellationToken _) + public static ImmutableArray> GetContexts(ImmutableArray data, CancellationToken _) { Dictionary nameToInterfaceInfoMap = new(); - var accumulator = ImmutableArray.CreateBuilder>(data.Length); + var accumulator = ImmutableArray.CreateBuilder>(data.Length); foreach (var iface in data) { nameToInterfaceInfoMap.Add(iface.ThisInterfaceKey, iface); } - Dictionary> nameToContextCache = new(); + Dictionary> nameToContextCache = new(); foreach (var iface in data) { @@ -32,7 +32,7 @@ public static ImmutableArray> GetContexts(Immu } return accumulator.MoveToImmutable(); - DiagnosticOr AddContext(ComInterfaceInfo iface) + DiagnosticsOr AddContext(ComInterfaceInfo iface) { if (nameToContextCache.TryGetValue(iface.ThisInterfaceKey, out var cachedValue)) { @@ -41,31 +41,31 @@ DiagnosticOr AddContext(ComInterfaceInfo iface) if (iface.BaseInterfaceKey is null) { - var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null)); + var baselessCtx = DiagnosticsOr.From(new ComInterfaceContext(iface, null)); nameToContextCache[iface.ThisInterfaceKey] = baselessCtx; return baselessCtx; } - DiagnosticOr baseReturnedValue; + DiagnosticsOr baseReturnedValue; if ( // Cached base info is a diagnostic - failure - (nameToContextCache.TryGetValue(iface.BaseInterfaceKey, out var baseCachedValue) && baseCachedValue.IsDiagnostic) + (nameToContextCache.TryGetValue(iface.BaseInterfaceKey, out var baseCachedValue) && baseCachedValue.HasDiagnostic) // Cannot find base ComInterfaceInfo - failure (failed ComInterfaceInfo creation) || !nameToInterfaceInfoMap.TryGetValue(iface.BaseInterfaceKey, out var baseInfo) // Newly calculated base context pair is a diagnostic - failure - || (baseReturnedValue = AddContext(baseInfo)).IsDiagnostic) + || (baseReturnedValue = AddContext(baseInfo)).HasDiagnostic) { // The base has failed generation at some point, so this interface cannot be generated - var diagnostic = DiagnosticOr.From( + var diagnostic = DiagnosticsOr.From( Diagnostic.Create( GeneratorDiagnostics.BaseInterfaceIsNotGenerated, iface.DiagnosticLocation.AsLocation(), iface.ThisInterfaceKey, iface.BaseInterfaceKey)); nameToContextCache[iface.ThisInterfaceKey] = diagnostic; return diagnostic; } - DiagnosticOr baseContext = baseCachedValue ?? baseReturnedValue; - Debug.Assert(baseContext.IsValue); - var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value)); + DiagnosticsOr baseContext = baseCachedValue ?? baseReturnedValue; + Debug.Assert(baseContext.HasValue); + var ctx = DiagnosticsOr.From(new ComInterfaceContext(iface, baseContext.Value)); nameToContextCache[iface.ThisInterfaceKey] = ctx; return ctx; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 31db875d638d48..5daac5d6f0752d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -25,7 +25,7 @@ internal sealed record ComInterfaceInfo( Guid InterfaceId, LocationInfo DiagnosticLocation) { - public static DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)> From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, CancellationToken _) + public static DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)> From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, CancellationToken _) { // Verify the method has no generic types or defined implementation // and is not marked static or sealed @@ -35,7 +35,7 @@ internal sealed record ComInterfaceInfo( // and is not marked static or sealed if (syntax.TypeParameterList is not null) { - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( Diagnostic.Create( GeneratorDiagnostics.InvalidAttributedInterfaceGenericNotSupported, syntax.Identifier.GetLocation(), @@ -48,7 +48,7 @@ internal sealed record ComInterfaceInfo( { if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword)) { - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( Diagnostic.Create( GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, syntax.Identifier.GetLocation(), @@ -58,15 +58,15 @@ internal sealed record ComInterfaceInfo( } if (!TryGetGuid(symbol, syntax, out Guid? guid, out Diagnostic? guidDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(guidDiagnostic); + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(guidDiagnostic); if (!TryGetBaseComInterface(symbol, syntax, out INamedTypeSymbol? baseSymbol, out Diagnostic? baseDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(baseDiagnostic); + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(baseDiagnostic); if (!StringMarshallingIsValid(symbol, syntax, baseSymbol, out Diagnostic? stringMarshallingDiagnostic)) - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(stringMarshallingDiagnostic); + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From(stringMarshallingDiagnostic); - return DiagnosticOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( + return DiagnosticsOr<(ComInterfaceInfo InterfaceInfo, INamedTypeSymbol Symbol)>.From( (new ComInterfaceInfo( ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol), symbol.ToDisplayString(), @@ -84,14 +84,25 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD var attrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol)); if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) { - if (attrInfo.StringMarshalling is StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is null) + if (attrInfo.StringMarshalling is StringMarshalling.Custom) { - stringMarshallingDiagnostic = Diagnostic.Create( - GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, - syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), - SR.InvalidStringMarshallingConfigurationMissingCustomType); - return false; + if (attrInfo.StringMarshallingCustomType is null) + { + stringMarshallingDiagnostic = Diagnostic.Create( + GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, + syntax.Identifier.GetLocation(), + symbol.ToDisplayString(), + SR.InvalidStringMarshallingConfigurationMissingCustomType); + return false; + } + if (attrInfo.StringMarshallingCustomTypeAccessibility.CompareTo(symbol.DeclaredAccessibility) < 0) + { + stringMarshallingDiagnostic = Diagnostic.Create( + GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, + syntax.Identifier.GetLocation(), + symbol.ToDisplayString(), + SR.InvalidStringMarshallingConfigurationMissingCustomType); + } } if (attrInfo.StringMarshalling is not StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is not null) { diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs index e11057fac7f787..9d4387367777f5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs @@ -23,9 +23,9 @@ internal sealed record ComMethodInfo( /// /// Returns a list of tuples of ComMethodInfo, IMethodSymbol, and Diagnostic. If ComMethodInfo is null, Diagnostic will not be null, and vice versa. /// - public static SequenceEqualImmutableArray> GetMethodsFromInterface((ComInterfaceInfo ifaceContext, INamedTypeSymbol ifaceSymbol) data, CancellationToken ct) + public static SequenceEqualImmutableArray> GetMethodsFromInterface((ComInterfaceInfo ifaceContext, INamedTypeSymbol ifaceSymbol) data, CancellationToken ct) { - var methods = ImmutableArray.CreateBuilder>(); + var methods = ImmutableArray.CreateBuilder>(); foreach (var member in data.ifaceSymbol.GetMembers()) { if (IsComMethodCandidate(member)) @@ -61,7 +61,7 @@ private static bool IsComMethodCandidate(ISymbol member) return member.Kind == SymbolKind.Method && !member.IsStatic; } - private static DiagnosticOr<(ComMethodInfo, IMethodSymbol)> CalculateMethodInfo(ComInterfaceInfo ifaceContext, IMethodSymbol method, CancellationToken ct) + private static DiagnosticsOr<(ComMethodInfo, IMethodSymbol)> CalculateMethodInfo(ComInterfaceInfo ifaceContext, IMethodSymbol method, CancellationToken ct) { ct.ThrowIfCancellationRequested(); Debug.Assert(IsComMethodCandidate(method)); @@ -84,7 +84,7 @@ private static bool IsComMethodCandidate(ISymbol member) if (methodLocationInAttributedInterfaceDeclaration is null) { - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); + return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.MethodNotDeclaredInAttributedInterface, method.Locations.FirstOrDefault(), method.ToDisplayString())); } @@ -102,13 +102,13 @@ private static bool IsComMethodCandidate(ISymbol member) } if (comMethodDeclaringSyntax is null) { - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString())); + return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From(Diagnostic.Create(GeneratorDiagnostics.CannotAnalyzeMethodPattern, method.Locations.FirstOrDefault(), method.ToDisplayString())); } var diag = GetDiagnosticIfInvalidMethodForGeneration(comMethodDeclaringSyntax, method); if (diag is not null) { - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(diag); + return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From(diag); } var attributes = method.GetAttributes(); @@ -118,7 +118,7 @@ private static bool IsComMethodCandidate(ISymbol member) attributeInfos.Add(AttributeInfo.From(attr)); } var comMethodInfo = new ComMethodInfo(comMethodDeclaringSyntax, method.Name, attributeInfos.MoveToImmutable().ToSequenceEqual()); - return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From((comMethodInfo, method)); + return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From((comMethodInfo, method)); } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs index f8c42b2c978529..72eb6a0daf36e5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs @@ -8,6 +8,7 @@ using System.Diagnostics.CodeAnalysis; using System.Text; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Editing; namespace Microsoft.Interop { @@ -17,6 +18,7 @@ namespace Microsoft.Interop /// internal sealed record GeneratedComInterfaceData : InteropAttributeData { + public Accessibility StringMarshallingCustomTypeAccessibility { get; init; } public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationData generatedComInterfaceAttr) => new GeneratedComInterfaceData() with { @@ -25,7 +27,8 @@ public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationDat StringMarshalling = generatedComInterfaceAttr.StringMarshalling, StringMarshallingCustomType = generatedComInterfaceAttr.StringMarshallingCustomType is not null ? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(generatedComInterfaceAttr.StringMarshallingCustomType) - : null + : null, + StringMarshallingCustomTypeAccessibility = generatedComInterfaceAttr.StringMarshallingCustomType.DeclaredAccessibility }; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs deleted file mode 100644 index 0be31fa6277675..00000000000000 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Runtime.InteropServices.ComTypes; -using System.Text; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -namespace Microsoft.Interop -{ - /// - /// A union of Diagnostic and T, representing either a value of type T or a Diagnostic. - /// Useful helper functions exist in and . - /// - public abstract record DiagnosticOr - { - public abstract bool IsValue { get; } - - public bool IsDiagnostic => !IsValue; - - /// - /// Throws if IsValue is false - /// - public abstract T Value { get; } - - /// - /// Throws if IsDiagnostic is false - /// - public abstract Diagnostic Diagnostic { get; } - - private sealed record Diag : DiagnosticOr - { - private readonly Diagnostic _diagnostic; - internal Diag(Diagnostic diagnostic) => _diagnostic = diagnostic; - public override bool IsValue => false; - public override T Value => throw new InvalidOperationException(); - public override Diagnostic Diagnostic => _diagnostic; - } - - private sealed record Val : DiagnosticOr - { - private readonly T _value; - internal Val(T value) => _value = value; - public override bool IsValue => true; - public override T Value => _value; - public override Diagnostic Diagnostic => throw new InvalidOperationException(); - } - - /// - /// Create a Diagnostic variant - /// - public static DiagnosticOr From(Diagnostic diagnostic) - { - Debug.Assert(diagnostic is not null); - return new Diag(diagnostic); - } - - /// - /// Create a Value variant - /// - public static DiagnosticOr From(T value) - { - Debug.Assert(value is not null); - return new Val(value); - } - } - - public static class DiagnosticOrTHelperExtensions - { - /// - /// Splits the elements of into a "values" provider and a "diagnositics" provider. - /// - public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider> provider) - { - var values = provider.Where(x => x.IsValue).Select(static (x, ct) => x.Value); - var diagnostics = provider.Where(x => x.IsDiagnostic).Select(static (x, ct) => x.Diagnostic); - return (values, diagnostics); - } - - /// - /// Splits the inner arrays of into values and diagnostics. - /// - public static (IncrementalValuesProvider>, IncrementalValuesProvider) SplitArrays(this IncrementalValuesProvider>> provider) - { - var values = provider.Select((arr, ct) => arr.Where(x => x.IsValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray()); - var diagnostics = provider.SelectMany((arr, ct) => arr.Where(x => x.IsDiagnostic).Select((x, ct) => x.Diagnostic)); - return (values, diagnostics); - } - - /// - /// Splits the elements of into groups depending on whether Item1 is a value or a Diagnostic. - /// - public static (IncrementalValuesProvider<(T, T2)>, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(DiagnosticOr, T2)> provider) - { - var values = provider.Where(x => x.Item1.IsValue).Select(static (x, ct) => (x.Item1.Value, x.Item2)); - var diagnostics = provider.Where(x => !x.Item1.IsValue).Select(static (x, ct) => x.Item1.Diagnostic); - return (values, diagnostics); - } - - /// - /// Filters the by whether or not the is a , reports the diagnostics, and returns the values. - /// - public static IncrementalValuesProvider FilterAndReportDiagnostics(this IncrementalGeneratorInitializationContext ctx, IncrementalValuesProvider> diagnosticOrValues) - { - var (values, diagnostics) = diagnosticOrValues.Split(); - ctx.RegisterDiagnostics(diagnostics); - return values; - } - - /// - /// Filters both by whether or not the value in is a , reports the diagnostics, and returns the values. - /// - public static (IncrementalValuesProvider, IncrementalValuesProvider) FilterAndReportDiagnostics( - this IncrementalGeneratorInitializationContext ctx, - IncrementalValuesProvider> diagnosticOrValues, - IncrementalValuesProvider associatedValues) - { - var (values, diagnostics) = diagnosticOrValues.Zip(associatedValues).Split(); - ctx.RegisterDiagnostics(diagnostics); - return values.Split(); - } - - /// - /// Filters each inner of by whether the elements are s, reports the diagnostics, and returns the values. - /// - public static IncrementalValuesProvider> FilterAndReportDiagnostics( - this IncrementalGeneratorInitializationContext ctx, - IncrementalValuesProvider>> diagnosticOrValues) - { - var (values, diagnostics) = diagnosticOrValues.SplitArrays(); - ctx.RegisterDiagnostics(diagnostics); - return values; - } - } -} diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index 7c00170541d6f4..f3c65defa79966 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -420,6 +420,58 @@ partial interface {|#0:IFoo2|} await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostic); } + [Fact] + public async Task VerifyStringMarshallingCustomTypeWithLessVisibilityThanInterfaceWarns() + { + var gciProvider = new GeneratedComInterfaceAttributeProvider(); + var group = new List<(string, string, DiagnosticResult[])>() + { + ("public", "public", new DiagnosticResult[] { }), + // Technically we don't support inheriting from a GeneratedComInterface from another assembly, so this should be okay + ("public", "internal", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("public", "protected", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("public", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("internal", "public", new DiagnosticResult[] { }), + ("internal", "internal", new DiagnosticResult[] { }), + ("internal", "protected", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("internal", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("protected", "public", new DiagnosticResult[] { }), + ("protected", "internal", new DiagnosticResult[] { }), + ("protected", "protected", new DiagnosticResult[] { }), + ("protected", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), + ("private", "public", new DiagnosticResult[] { }), + ("private", "internal", new DiagnosticResult[] { }), + ("private", "protected", new DiagnosticResult[] { }), + ("private", "private", new DiagnosticResult[] { }), + }; + + foreach (var (interfaceVisibility, customTypeVisibility, diagnostics) in group) + { + + var source = $$""" + public static class Program { + [System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(string), MarshalMode.Default, typeof(CustomStringMarshallingType))] + {{customTypeVisibility}} class CustomStringMarshallingType + { + public static string? ConvertToManaged(ushort* unmanaged) => throw new NotImplementedException(); + public static ushort* ConvertToUnmanaged(string? managed) => throw new NotImplementedException(); + public static void Free(ushort* unmanaged) => throw new NotImplementedException(); + public static ref readonly char GetPinnableReference(string? str) => throw new NotImplementedException(); + } + + [System.Runtime.InteropServices.Marshalling.GeneratedComInterface(StringMarshalling.Custom, typeof(CustomStringMarshallingType)] + {{interfaceVisibility}} partial interface {|#{{0}}:IStringMarshalling|} + { + public string GetString(); + public void SetString(string value); + } + } + """; + + await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics); + } + } + [Fact] public async Task VerifyComInterfaceInheritingFromComInterfaceInOtherAssemblyReportsDiagnostic() { From 3d005bf4e29084fa7d64f611942c9d8da77e4d97 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Wed, 31 May 2023 17:37:47 -0700 Subject: [PATCH 09/16] wip --- .../ComInterfaceContext.cs | 4 +- .../DiagnosticOr.cs | 80 ++++++++++++++----- .../SequenceEqualImmutableArray.cs | 5 ++ 3 files changed, 69 insertions(+), 20 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 874bf15cda9e15..a6b2ff38894618 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -63,9 +63,9 @@ DiagnosticsOr AddContext(ComInterfaceInfo iface) nameToContextCache[iface.ThisInterfaceKey] = diagnostic; return diagnostic; } - DiagnosticsOr baseContext = baseCachedValue ?? baseReturnedValue; + DiagnosticOr baseContext = baseCachedValue ?? baseReturnedValue; Debug.Assert(baseContext.HasValue); - var ctx = DiagnosticsOr.From(new ComInterfaceContext(iface, baseContext.Value)); + var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value)); nameToContextCache[iface.ThisInterfaceKey] = ctx; return ctx; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs index caa15d3a0d6664..d4d05282b9e460 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs @@ -20,9 +20,9 @@ namespace Microsoft.Interop /// public abstract record DiagnosticOr { - public abstract bool IsValue { get; } + public abstract bool HasValue { get; } - public bool IsDiagnostic => !IsValue; + public abstract bool HasDiagnostic { get; } /// /// Throws if IsValue is false @@ -32,33 +32,67 @@ public abstract record DiagnosticOr /// /// Throws if IsDiagnostic is false /// - public abstract DiagnosticInfo Diagnostic { get; } + public abstract ImmutableArray Diagnostics { get; } private sealed record Diag : DiagnosticOr { - private readonly DiagnosticInfo _diagnostic; - internal Diag(DiagnosticInfo diagnostic) => _diagnostic = diagnostic; - public override bool IsValue => false; + private readonly SequenceEqualImmutableArray _diagnostics; + internal Diag(ImmutableArray diagnostics) => _diagnostics = diagnostics.ToSequenceEqual(); + public override bool HasValue => false; + public override bool HasDiagnostic => true; public override T Value => throw new InvalidOperationException(); - public override DiagnosticInfo Diagnostic => _diagnostic; + public override ImmutableArray Diagnostics => _diagnostics.Array; } private sealed record Val : DiagnosticOr { private readonly T _value; internal Val(T value) => _value = value; - public override bool IsValue => true; + public override bool HasValue => true; + public override bool HasDiagnostic => false; public override T Value => _value; - public override DiagnosticInfo Diagnostic => throw new InvalidOperationException(); + public override ImmutableArray Diagnostics => throw new InvalidOperationException(); + } + + private sealed record ValueAndDiagnostic : DiagnosticOr + { + private readonly T _value; + private readonly SequenceEqualImmutableArray _diagnostics; + internal ValueAndDiagnostic(T value, ImmutableArray diagnostics) => (_value, _diagnostics) = (value, diagnostics.ToSequenceEqual()); + public override bool HasValue => true; + public override bool HasDiagnostic => false; + public override T Value => _value; + public override ImmutableArray Diagnostics => _diagnostics.Array; } + /// + /// Adds a diagnostic to the property + /// + public DiagnosticOr AddDiagnostic(DiagnosticInfo diagnostic) => this switch + { + Diag d => new Diag(d.Diagnostics.Add(diagnostic)), + Val v => new ValueAndDiagnostic(v.Value, ImmutableArray.Create(diagnostic)), + ValueAndDiagnostic vad => new ValueAndDiagnostic(vad.Value, vad.Diagnostics.Add(diagnostic)), + _ => throw new UnreachableException() + }; + + /// + /// Creates a new with the set to + /// + public DiagnosticOr WithValue(T value) => this switch + { + Diag d => new ValueAndDiagnostic(value, d.Diagnostics), + Val => new Val(value), + ValueAndDiagnostic vad => new ValueAndDiagnostic(value, vad.Diagnostics), + _ => throw new UnreachableException() + }; + /// /// Create a Diagnostic variant /// - public static DiagnosticOr From(DiagnosticInfo diagnostic) + public static DiagnosticOr From(params DiagnosticInfo[] diagnostic) { - Debug.Assert(diagnostic is not null); - return new Diag(diagnostic); + return new Diag(ImmutableArray.Create(diagnostic)); } /// @@ -69,6 +103,16 @@ public static DiagnosticOr From(T value) Debug.Assert(value is not null); return new Val(value); } + + /// + /// Create a ValueAndDiagnostic variant + /// + public static DiagnosticOr From(T value, params DiagnosticInfo[] diagnostics) + { + Debug.Assert(value is not null); + Debug.Assert(diagnostics is not null); + return new ValueAndDiagnostic(value, ImmutableArray.Create(diagnostics)); + } } public static class DiagnosticOrTHelperExtensions @@ -78,8 +122,8 @@ public static class DiagnosticOrTHelperExtensions /// public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider> provider) { - var values = provider.Where(x => x.IsValue).Select(static (x, ct) => x.Value); - var diagnostics = provider.Where(x => x.IsDiagnostic).Select(static (x, ct) => x.Diagnostic); + var values = provider.Where(x => x.HasValue).Select(static (x, ct) => x.Value); + var diagnostics = provider.Where(x => x.HasDiagnostic).SelectMany(static (x, ct) => x.Diagnostics); return (values, diagnostics); } @@ -88,8 +132,8 @@ public static (IncrementalValuesProvider, IncrementalValuesProvider public static (IncrementalValuesProvider>, IncrementalValuesProvider) SplitArrays(this IncrementalValuesProvider>> provider) { - var values = provider.Select((arr, ct) => arr.Where(x => x.IsValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray()); - var diagnostics = provider.SelectMany((arr, ct) => arr.Where(x => x.IsDiagnostic).Select((x, ct) => x.Diagnostic)); + var values = provider.Select((arr, ct) => arr.Where(x => x.HasValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray()); + var diagnostics = provider.SelectMany((arr, ct) => arr.Where(x => x.HasDiagnostic).SelectMany((x, ct) => x.Diagnostics)); return (values, diagnostics); } @@ -98,8 +142,8 @@ public static (IncrementalValuesProvider>, Increm /// public static (IncrementalValuesProvider<(T, T2)>, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(DiagnosticOr, T2)> provider) { - var values = provider.Where(x => x.Item1.IsValue).Select(static (x, ct) => (x.Item1.Value, x.Item2)); - var diagnostics = provider.Where(x => !x.Item1.IsValue).Select(static (x, ct) => x.Item1.Diagnostic); + var values = provider.Where(x => x.Item1.HasValue).Select(static (x, ct) => (x.Item1.Value, x.Item2)); + var diagnostics = provider.Where(x => x.Item1.HasDiagnostic).SelectMany(static (x, ct) => x.Item1.Diagnostics); return (values, diagnostics); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SequenceEqualImmutableArray.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SequenceEqualImmutableArray.cs index 0c49cddb4cc157..b529caafa4b568 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SequenceEqualImmutableArray.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SequenceEqualImmutableArray.cs @@ -22,6 +22,11 @@ public SequenceEqualImmutableArray(ImmutableArray array) { } + public SequenceEqualImmutableArray Add(T value) + { + return new SequenceEqualImmutableArray(Array.Add(value)); + } + public T this[int i] { get => Array[i]; } public int Length => Array.Length; From 21698f56cc024b632c8cf7759b8a285be31efca4 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Thu, 1 Jun 2023 16:54:01 -0700 Subject: [PATCH 10/16] Warn if StringMarshallingCustomType or Com interface is less than internal visibility --- .../Diagnostics/Reader/UnsafeNativeMethods.cs | 6 - .../ComInterfaceContext.cs | 12 +- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 30 ++-- .../ComInterfaceGenerator/ComMethodInfo.cs | 10 +- .../GeneratedComInterfaceAttributeData.cs | 4 +- .../GeneratorDiagnostics.cs | 21 +++ .../Resources/Strings.resx | 8 +- .../Resources/xlf/Strings.cs.xlf | 14 +- .../Resources/xlf/Strings.de.xlf | 14 +- .../Resources/xlf/Strings.es.xlf | 14 +- .../Resources/xlf/Strings.fr.xlf | 14 +- .../Resources/xlf/Strings.it.xlf | 14 +- .../Resources/xlf/Strings.ja.xlf | 14 +- .../Resources/xlf/Strings.ko.xlf | 14 +- .../Resources/xlf/Strings.pl.xlf | 14 +- .../Resources/xlf/Strings.pt-BR.xlf | 14 +- .../Resources/xlf/Strings.ru.xlf | 14 +- .../Resources/xlf/Strings.tr.xlf | 14 +- .../Resources/xlf/Strings.zh-Hans.xlf | 14 +- .../Resources/xlf/Strings.zh-Hant.xlf | 14 +- .../DiagnosticOr.cs | 2 +- .../CompileFails.cs | 135 +++++++++++++----- 22 files changed, 318 insertions(+), 92 deletions(-) diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs index f29228af3280ed..21ce94d0c423f3 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/UnsafeNativeMethods.cs @@ -477,12 +477,6 @@ internal static partial bool EvtNext( int timeout, int flags, ref int returned); - [LibraryImport("user32.dll", EntryPoint = "GetClassNameW", SetLastError = true)] - internal static partial int GetClassName(IntPtr hWnd, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2)] char[] lpClassName, int nMaxCount); - [LibraryImport(nameof(int))] - public static partial int CountArrayElements( - [MarshalUsing(typeof(ArrayMarshaller<,>))] int[] array, // Unlike the V1 system, we'll allow open generics in the V2 system in MarshalUsing since there's an extra generic parameter that the user does not provide. - out int numElements); [LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index a6b2ff38894618..a948cf45a7a2fd 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -16,15 +16,15 @@ internal sealed record ComInterfaceContext(ComInterfaceInfo Info, ComInterfaceCo /// /// Takes a list of ComInterfaceInfo, and creates a list of ComInterfaceContext. /// - public static ImmutableArray> GetContexts(ImmutableArray data, CancellationToken _) + public static ImmutableArray> GetContexts(ImmutableArray data, CancellationToken _) { Dictionary nameToInterfaceInfoMap = new(); - var accumulator = ImmutableArray.CreateBuilder>(data.Length); + var accumulator = ImmutableArray.CreateBuilder>(data.Length); foreach (var iface in data) { nameToInterfaceInfoMap.Add(iface.ThisInterfaceKey, iface); } - Dictionary> nameToContextCache = new(); + Dictionary> nameToContextCache = new(); foreach (var iface in data) { @@ -32,7 +32,7 @@ public static ImmutableArray> GetContexts(Imm } return accumulator.MoveToImmutable(); - DiagnosticsOr AddContext(ComInterfaceInfo iface) + DiagnosticOr AddContext(ComInterfaceInfo iface) { if (nameToContextCache.TryGetValue(iface.ThisInterfaceKey, out var cachedValue)) { @@ -41,12 +41,12 @@ DiagnosticsOr AddContext(ComInterfaceInfo iface) if (iface.BaseInterfaceKey is null) { - var baselessCtx = DiagnosticsOr.From(new ComInterfaceContext(iface, null)); + var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null)); nameToContextCache[iface.ThisInterfaceKey] = baselessCtx; return baselessCtx; } - DiagnosticsOr baseReturnedValue; + DiagnosticOr baseReturnedValue; if ( // Cached base info is a diagnostic - failure (nameToContextCache.TryGetValue(iface.BaseInterfaceKey, out var baseCachedValue) && baseCachedValue.HasDiagnostic) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 837d7e12fa100a..9a5ecbb7723c80 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -10,7 +10,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Interop; -using DiagnosticOrInterfaceInfo = Microsoft.Interop.DiagnosticOr<(Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol) >; +using DiagnosticOrInterfaceInfo = Microsoft.Interop.DiagnosticOr<(Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol)>; namespace Microsoft.Interop { @@ -59,6 +59,15 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD } } + if (symbol.DeclaredAccessibility - Accessibility.Internal < 0) + { + return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create( + GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, + symbol.Locations[0], + symbol.ToDisplayString(), + symbol.DeclaredAccessibility.ToString().ToLowerInvariant())); + } + if (!TryGetGuid(symbol, syntax, out Guid? guid, out DiagnosticInfo? guidDiagnostic)) return DiagnosticOrInterfaceInfo.From(guidDiagnostic); @@ -90,27 +99,22 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD { if (attrInfo.StringMarshallingCustomType is null) { - stringMarshallingDiagnostic = Diagnostic.Create( + stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, syntax.Identifier.GetLocation(), symbol.ToDisplayString(), SR.InvalidStringMarshallingConfigurationMissingCustomType); return false; } - if (attrInfo.StringMarshallingCustomTypeAccessibility.CompareTo(symbol.DeclaredAccessibility) < 0) + // higher enum value is more accessible + if (attrInfo.StringMarshallingCustomTypeAccessibility - Accessibility.Internal < 0) { - stringMarshallingDiagnostic = Diagnostic.Create( - GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, + stringMarshallingDiagnostic = DiagnosticInfo.Create( + GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode, syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), - SR.InvalidStringMarshallingConfigurationMissingCustomType); + attrInfo.StringMarshallingCustomType.FullTypeName.Replace("global::", "")); + return false; } - stringMarshallingDiagnostic = DiagnosticInfo.Create( - GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, - syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), - SR.InvalidStringMarshallingConfigurationMissingCustomType); - return false; } if (attrInfo.StringMarshalling is not StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is not null) { diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs index 19d2a5b9924ccc..c80290ffb0904b 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodInfo.cs @@ -23,9 +23,9 @@ internal sealed record ComMethodInfo( /// /// Returns a list of tuples of ComMethodInfo, IMethodSymbol, and Diagnostic. If ComMethodInfo is null, Diagnostic will not be null, and vice versa. /// - public static SequenceEqualImmutableArray> GetMethodsFromInterface((ComInterfaceInfo ifaceContext, INamedTypeSymbol ifaceSymbol) data, CancellationToken ct) + public static SequenceEqualImmutableArray> GetMethodsFromInterface((ComInterfaceInfo ifaceContext, INamedTypeSymbol ifaceSymbol) data, CancellationToken ct) { - var methods = ImmutableArray.CreateBuilder>(); + var methods = ImmutableArray.CreateBuilder>(); foreach (var member in data.ifaceSymbol.GetMembers()) { if (IsComMethodCandidate(member)) @@ -61,7 +61,7 @@ private static bool IsComMethodCandidate(ISymbol member) return member.Kind == SymbolKind.Method && !member.IsStatic; } - private static DiagnosticsOr<(ComMethodInfo, IMethodSymbol)> CalculateMethodInfo(ComInterfaceInfo ifaceContext, IMethodSymbol method, CancellationToken ct) + private static DiagnosticOr<(ComMethodInfo, IMethodSymbol)> CalculateMethodInfo(ComInterfaceInfo ifaceContext, IMethodSymbol method, CancellationToken ct) { ct.ThrowIfCancellationRequested(); Debug.Assert(IsComMethodCandidate(method)); @@ -108,7 +108,7 @@ private static bool IsComMethodCandidate(ISymbol member) var diag = GetDiagnosticIfInvalidMethodForGeneration(comMethodDeclaringSyntax, method); if (diag is not null) { - return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From(diag); + return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(diag); } var attributes = method.GetAttributes(); @@ -118,7 +118,7 @@ private static bool IsComMethodCandidate(ISymbol member) attributeInfos.Add(AttributeInfo.From(attr)); } var comMethodInfo = new ComMethodInfo(comMethodDeclaringSyntax, method.Name, attributeInfos.MoveToImmutable().ToSequenceEqual()); - return DiagnosticsOr<(ComMethodInfo, IMethodSymbol)>.From((comMethodInfo, method)); + return DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From((comMethodInfo, method)); } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs index 72eb6a0daf36e5..bc8ff89f07852e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs @@ -18,7 +18,7 @@ namespace Microsoft.Interop /// internal sealed record GeneratedComInterfaceData : InteropAttributeData { - public Accessibility StringMarshallingCustomTypeAccessibility { get; init; } + public Accessibility? StringMarshallingCustomTypeAccessibility { get; init; } public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationData generatedComInterfaceAttr) => new GeneratedComInterfaceData() with { @@ -28,7 +28,7 @@ public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationDat StringMarshallingCustomType = generatedComInterfaceAttr.StringMarshallingCustomType is not null ? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(generatedComInterfaceAttr.StringMarshallingCustomType) : null, - StringMarshallingCustomTypeAccessibility = generatedComInterfaceAttr.StringMarshallingCustomType.DeclaredAccessibility + StringMarshallingCustomTypeAccessibility = generatedComInterfaceAttr.StringMarshallingCustomType?.DeclaredAccessibility }; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index f02a6c209963bf..258f38cab0b6a6 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -95,6 +95,16 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.InvalidStringMarshallingConfigurationDescription))); + /// + public static readonly DiagnosticDescriptor StringMarshallingCustomTypeNotAccessibleByGeneratedCode = + new DiagnosticDescriptor( + Ids.InvalidGeneratedComInterfaceAttributeUsage, + GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageTitle)), + GetResourceString(nameof(SR.StringMarshallingCustomTypeNotAccessibleByGeneratedCode)), + Category, + DiagnosticSeverity.Error, + isEnabledByDefault: true); + /// public static readonly DiagnosticDescriptor InvalidExceptionMarshallingConfiguration = new DiagnosticDescriptor( @@ -216,6 +226,17 @@ public class Ids isEnabledByDefault: true, description: GetResourceString(nameof(SR.MethodNotDeclaredInAttributedInterfaceDescription))); + /// + public static readonly DiagnosticDescriptor InvalidAttributedInterfaceNotAccessible = + new DiagnosticDescriptor( + Ids.InvalidGeneratedComInterfaceAttributeUsage, + GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageTitle)), + GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageInterfaceNotAccessible)), + Category, + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageDescription))); + /// public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingGuidAttribute = new DiagnosticDescriptor( diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx index f797fced9f31a2..a77a8cf31dbe72 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx @@ -220,7 +220,7 @@ Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. @@ -267,4 +267,10 @@ The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf index 0776aec0879c7e..06b130f2516f5d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Rozhraní s atributem GeneratedComInterfaceAttribute musí být částečná, neobecná a musí určovat identifikátor GUID s atributem System.Runtime.InteropServices.GuidAttribute. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Rozhraní s atributem GeneratedComInterfaceAttribute musí být částečná, neobecná a musí určovat identifikátor GUID s atributem System.Runtime.InteropServices.GuidAttribute. @@ -142,6 +142,11 @@ Rozhraní „{0}“ má atribut GeneratedComInterfaceAttribute, ale je obecné. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. Rozhraní {0} má atribut GeneratedComInterfaceAttribute, ale chybí atribut System.Runtime.InteropServices.GuidAttribute. @@ -212,6 +217,11 @@ Zadané rozhraní je odvozeno ze dvou nebo více rozhraní s atributem GeneratedComInterfaceAttribute. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. U typů, které nejsou podporovány modelem COM generovaným zdrojem, bude výsledný ukazatel funkce při zařazování zadaného typu spoléhat na základní modul runtime. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf index 3d7ec0ceab7daa..5277cd24512ce3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Schnittstellen, die mit "GeneratedComInterfaceAttribute" attributiert sind, müssen partielle, nicht generische Schnittstellen sein und eine GUID mit "System.Runtime.InteropServices.GuidAttribute" angeben. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Schnittstellen, die mit "GeneratedComInterfaceAttribute" attributiert sind, müssen partielle, nicht generische Schnittstellen sein und eine GUID mit "System.Runtime.InteropServices.GuidAttribute" angeben. @@ -142,6 +142,11 @@ Die Schnittstelle "{0}" wird mit "GeneratedComInterfaceAttribute" attributiert, ist aber generisch. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. Die Schnittstelle „{0}“ ist mit „GeneratedComInterfaceAttribute“ attribuiert, aber „System.Runtime.InteropServices.GuidAttribute“ fehlt. @@ -212,6 +217,11 @@ Die angegebene Schnittstelle wird von mindestens zwei Schnittstellen abgeleitet, die "GeneratedComInterfaceAttribute" zugeordnet sind. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Bei Typen, die vom quellgenerierten COM nicht unterstützt werden, basiert der resultierende Funktionszeiger auf der zugrunde liegenden Laufzeit, um den angegebenen Typ zu marshallen. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf index a24178f2ff4462..8f1b0d539216f6 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Las interfaces con el atributo “GeneratedComInterfaceAttribute” deben ser parciales, no genéricas y deben especificar un GUID con “System.Runtime.InteropServices.GuidAttribute”. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Las interfaces con el atributo “GeneratedComInterfaceAttribute” deben ser parciales, no genéricas y deben especificar un GUID con “System.Runtime.InteropServices.GuidAttribute”. @@ -142,6 +142,11 @@ La interfaz “{0}” tiene el atributo ”GeneratedComInterfaceAttribute”, pero es genérica. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. La interfaz '{0}' tiene atribuido 'GeneratedComInterfaceAttribute', pero falta 'System.Runtime.InteropServices.GuidAttribute'. @@ -212,6 +217,11 @@ La interfaz especificada deriva de dos o más interfaces con atributos "GeneratedComInterfaceAttribute". + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Para los tipos que no son compatibles con COM generado por el origen, el puntero de función resultante se basará en el tiempo de ejecución subyacente para serializar el tipo especificado. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf index 97bdf01915648a..6f55589207b91d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Les interfaces sont attribuées à « GeneratedComInterfaceAttribute » doivent être partielles, non génériques et doivent spécifier un GUID avec « System.Runtime.InteropServices.GuidAttribute ». + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Les interfaces sont attribuées à « GeneratedComInterfaceAttribute » doivent être partielles, non génériques et doivent spécifier un GUID avec « System.Runtime.InteropServices.GuidAttribute ». @@ -142,6 +142,11 @@ L’interface '{0}' est attribuée à 'GeneratedComInterfaceAttribute', mais est générique. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. L’interface « {0} » est attribuée à « GeneratedComInterfaceAttribute » mais « System.Runtime.InteropServices.GuidAttribute » est manquant. @@ -212,6 +217,11 @@ L’interface spécifiée dérive de deux ou plusieurs interfaces avec attribut 'GeneratedComInterfaceAttribute'. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Pour les types qui ne sont pas pris en charge par com généré par la source, le pointeur de fonction résultant s’appuie sur le runtime sous-jacent pour marshaler le type spécifié. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf index ae11d9f9f0ea80..0481afc333c778 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Le interfacce con attributo 'GeneratedComInterfaceAttribute' devono essere parziali, non generiche e devono specificare un GUID con 'System.Runtime.InteropServices.GuidAttribute'. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Le interfacce con attributo 'GeneratedComInterfaceAttribute' devono essere parziali, non generiche e devono specificare un GUID con 'System.Runtime.InteropServices.GuidAttribute'. @@ -142,6 +142,11 @@ L'interfaccia '{0}' ha l'attributo 'GeneratedComInterfaceAttribute' ma è generico. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. L'interfaccia '{0}' è attribuita con 'GeneratedComInterfaceAttribute' ma 'System.Runtime.InteropServices.GuidAttribute' è mancante. @@ -212,6 +217,11 @@ L'interfaccia specificata deriva da due o più interfacce con attributi 'GeneratedComInterfaceAttribute'. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Per i tipi non supportati dai COM generati dall'origine, il puntatore funzione risultante si baserà sul runtime sottostante per effettuare il marshalling del tipo specificato. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf index 042d3ac235cfb4..bc1521450a6267 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - 'GeneratedComInterfaceAttribute' の属性を持つインターフェイスは部分的で、非ジェネリックである必要があり、'System.Runtime.InteropServices.GuidAttribute' で GUID を指定する必要があります。 + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + 'GeneratedComInterfaceAttribute' の属性を持つインターフェイスは部分的で、非ジェネリックである必要があり、'System.Runtime.InteropServices.GuidAttribute' で GUID を指定する必要があります。 @@ -142,6 +142,11 @@ インターフェイス '{0}' は 'GeneratedComInterfaceAttribute' で属性付けされていますが、ジェネリックです。 + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. インターフェイス '{0}' の属性は 'GeneratedComInterfaceAttribute' ですが、'System.Runtime.InteropServices.GuidAttribute' がありません。 @@ -212,6 +217,11 @@ 指定されたインターフェイスは、2 つ以上の 'GeneratedComInterfaceAttribute' 属性インターフェイスから派生しています。 + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. ソース生成済みの COM でサポートされていない型である場合、生成された関数ポインターは、基礎となるなるランタイムに依存して、指定された型をマーシャリングします。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf index a13812c5cdc31d..0551be151e679f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - 'GeneratedComInterfaceAttribute'로 특성이 지정된 인터페이스는 부분적이고 제네릭이 아니어야 하며 'System.Runtime.InteropServices.GuidAttribute'를 사용하여 GUID를 지정해야 합니다. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + 'GeneratedComInterfaceAttribute'로 특성이 지정된 인터페이스는 부분적이고 제네릭이 아니어야 하며 'System.Runtime.InteropServices.GuidAttribute'를 사용하여 GUID를 지정해야 합니다. @@ -142,6 +142,11 @@ '{0}' 인터페이스는 'GeneratedComInterfaceAttribute'로 특성이 지정되지만 제네릭입니다. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. 인터페이스 '{0}'에 'GeneratedComInterfaceAttribute'이(가) 지정되었지만 'System.Runtime.InteropServices.GuidAttribute'이(가) 누락되었습니다. @@ -212,6 +217,11 @@ 지정한 인터페이스는 두 개 이상의 'GeneratedComInterfaceAttribute' 특성 인터페이스에서 파생됩니다. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. 원본 생성 COM에서 지원하지 않는 형식의 경우 결과 함수 포인터는 기본 런타임을 사용하여 지정된 형식을 마샬링합니다. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf index 63f9240f3f68a5..43d36b726ae6d6 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Interfejsy z atrybutem „GeneratedComInterfaceAttribute” muszą być częściowe, nie być ogóle, i muszą określać identyfikator GUID z atrybutem „System.Runtime.InteropServices.GuidAttribute”. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Interfejsy z atrybutem „GeneratedComInterfaceAttribute” muszą być częściowe, nie być ogóle, i muszą określać identyfikator GUID z atrybutem „System.Runtime.InteropServices.GuidAttribute”. @@ -142,6 +142,11 @@ Interfejs „{0}” ma atrybut „GeneratedComInterfaceAttribute”, ale jest ogólny. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. Interfejs „{0}” ma atrybut „GeneratedComInterfaceAttribute”, ale brakuje atrybutu „System.Runtime.InteropServices.GuidAttribute”. @@ -212,6 +217,11 @@ Określony interfejs pochodzi z co najmniej dwóch interfejsów z atrybutem „GeneratedComInterfaceAttribute”. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. W przypadku typów, które nie są obsługiwane przez COM wygenerowany przez źródło, wynikowy wskaźnik funkcji będzie polegał na bazowym środowisku uruchomieniowym w celu skierowania określonego typu. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf index 9ce3756f147c4c..aaa74b116d40d1 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - As interfaces atribuídas com "GeneratedComInterfaceAttribute" devem ser parciais, não-genéricas e especificar um GUID com "System.Runtime.InteropServices.GuidAttribute". + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + As interfaces atribuídas com "GeneratedComInterfaceAttribute" devem ser parciais, não-genéricas e especificar um GUID com "System.Runtime.InteropServices.GuidAttribute". @@ -142,6 +142,11 @@ A interface "{0}" é atribuída com "GeneratedComInterfaceAttribute", mas é genérica. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. A interface "{0}" é atribuída com "GeneratedComInterfaceAttribute", mas "System.Runtime.InteropServices.GuidAttribute" está ausente. @@ -212,6 +217,11 @@ A interface especificada deriva de duas ou mais interfaces atribuídas a 'GeneratedComInterfaceAttribute'. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Para tipos sem suporte para um COM gerado pela origem, o ponteiro de função resultante dependerá do tempo de execução subjacente para realizar marshaling no tipo especificado. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf index 01ab6e83a0c67f..3a84e2a81ceb64 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Интерфейсы с атрибутом GeneratedComInterfaceAttribute должны быть частичными, не универсальными и должны указывать GUID с помощью System.Runtime.InteropServices.GuidAttribute. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + Интерфейсы с атрибутом GeneratedComInterfaceAttribute должны быть частичными, не универсальными и должны указывать GUID с помощью System.Runtime.InteropServices.GuidAttribute. @@ -142,6 +142,11 @@ Интерфейс "{0}" использует атрибут GeneratedComInterfaceAttribute, но является универсальным. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. Для "{0}" интерфейса указан атрибут GeneratedComInterfaceAttribute, но отсутствует атрибут System.Runtime.InteropServices.GuidAttribute. @@ -212,6 +217,11 @@ Указанный интерфейс является производным от двух или более интерфейсов с атрибутом "GeneratedComInterfaceAttribute". + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Для типов, которые не поддерживаются моделью COM генератора исходного кода, результирующий указатель на функцию будет выполнять маршалинг указанного типа на базе используемой среды выполнения. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf index a14f019f5ffdf4..f38cb43da14142 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - 'GeneratedComInterfaceAttribute' özniteliğine sahip arabirimler kısmi olmalı, genel olmamalı ve 'System.Runtime.InteropServices.GuidAttribute' ile bir GUID belirtmelidir. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + 'GeneratedComInterfaceAttribute' özniteliğine sahip arabirimler kısmi olmalı, genel olmamalı ve 'System.Runtime.InteropServices.GuidAttribute' ile bir GUID belirtmelidir. @@ -142,6 +142,11 @@ '{0}' 'GeneratedComInterfaceAttribute' özniteliğine sahip ancak genel. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. '{0}' arabirimi 'GeneratedComInterfaceAttribute' özniteliğine sahip ancak 'System.Runtime.InteropServices.GuidAttribute' eksik. @@ -212,6 +217,11 @@ Belirtilen arabirim 'GeneratedComInterfaceAttribute' özniteliğine sahip iki veya daha fazla arabirimden türetildi. + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. Kaynak tarafından oluşturulan COM tarafından desteklenmeyen türler için, ortaya çıkan işlev işaretçisi, belirtilen türü sıralamak için temeldeki çalışma zamanına güvenir. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf index 5e6828035a442e..7104d28e29f18f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - 通过 "GeneratedComInterfaceAttribute" 特性化的接口必须是部分的、非泛型的,并且必须使用 "System.Runtime.InteropServices.GuidAttribute" 指定 GUID。 + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + 通过 "GeneratedComInterfaceAttribute" 特性化的接口必须是部分的、非泛型的,并且必须使用 "System.Runtime.InteropServices.GuidAttribute" 指定 GUID。 @@ -142,6 +142,11 @@ “{0}”接口通过 "GeneratedComInterfaceAttribute" 特性化,但为泛型接口。 + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. 接口“{0}”会通过 “GeneratedComInterfaceAttribute” 特性化,但缺少“System.Runtime.InteropServices.GuidAttribute”。 @@ -212,6 +217,11 @@ 指定的接口派生自两个或更多“GeneratedComInterfaceAttribute”特性化接口。 + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. 对于源生成的 COM 不支持的类型,生成的函数指针将依赖基础运行时来封送指定的类型。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf index e9d2af2026abdc..007fca2f0f5389 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf @@ -133,8 +133,8 @@ - Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - 屬性為 'GeneratedComInterfaceAttribute' 的介面必須是部分的非泛型介面,且必須指定具有 'System.Runtime.InteropServices.GuidAttribute' 的 GUID。 + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. + 屬性為 'GeneratedComInterfaceAttribute' 的介面必須是部分的非泛型介面,且必須指定具有 'System.Runtime.InteropServices.GuidAttribute' 的 GUID。 @@ -142,6 +142,11 @@ 介面 '{0}' 的屬性為 'GeneratedComInterfaceAttribute',但為泛型介面。 + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. 介面 '{0}' 的屬性為 'GeneratedComInterfaceAttribute',但遺漏 'System.Runtime.InteropServices.GuidAttribute'。 @@ -212,6 +217,11 @@ 指定的介面衍生自兩個或兩個以上的 'GeneratedComInterfaceAttribute'-屬性介面。 + + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. 對於來源產生的 COM 不支援的類型,產生的函式指標將依賴基礎執行階段來封送處理指定的類型。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs index d4d05282b9e460..c95b61c7622c4a 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs @@ -60,7 +60,7 @@ private sealed record ValueAndDiagnostic : DiagnosticOr private readonly SequenceEqualImmutableArray _diagnostics; internal ValueAndDiagnostic(T value, ImmutableArray diagnostics) => (_value, _diagnostics) = (value, diagnostics.ToSequenceEqual()); public override bool HasValue => true; - public override bool HasDiagnostic => false; + public override bool HasDiagnostic => true; public override T Value => _value; public override ImmutableArray Diagnostics => _diagnostics.Array; } diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index f3c65defa79966..10b83932ec8177 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -20,6 +20,7 @@ using StringMarshalling = System.Runtime.InteropServices.StringMarshalling; using System.Runtime.InteropServices.Marshalling; using Microsoft.CodeAnalysis.CSharp; +using System.Security.Cryptography.X509Certificates; namespace ComInterfaceGenerator.Unit.Tests { @@ -420,46 +421,101 @@ partial interface {|#0:IFoo2|} await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostic); } - [Fact] - public async Task VerifyStringMarshallingCustomTypeWithLessVisibilityThanInterfaceWarns() + public static IEnumerable InterfaceVisibilities() { - var gciProvider = new GeneratedComInterfaceAttributeProvider(); - var group = new List<(string, string, DiagnosticResult[])>() - { - ("public", "public", new DiagnosticResult[] { }), - // Technically we don't support inheriting from a GeneratedComInterface from another assembly, so this should be okay - ("public", "internal", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("public", "protected", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("public", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("internal", "public", new DiagnosticResult[] { }), - ("internal", "internal", new DiagnosticResult[] { }), - ("internal", "protected", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("internal", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("protected", "public", new DiagnosticResult[] { }), - ("protected", "internal", new DiagnosticResult[] { }), - ("protected", "protected", new DiagnosticResult[] { }), - ("protected", "private", new DiagnosticResult[]{ new DiagnosticResult().WithLocation(0) }), - ("private", "public", new DiagnosticResult[] { }), - ("private", "internal", new DiagnosticResult[] { }), - ("private", "protected", new DiagnosticResult[] { }), - ("private", "private", new DiagnosticResult[] { }), + var emptyDiagnostics = new DiagnosticResult[] { }; + var diagnostic = new DiagnosticResult[]{ + new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) + .WithLocation(0) + .WithArguments("Test.IStringMarshalling") }; - foreach (var (interfaceVisibility, customTypeVisibility, diagnostics) in group) + var group = new List<(string, DiagnosticResult[], string)>() { + ("public", emptyDiagnostics, ID()), + ("internal", emptyDiagnostics, ID()), + ( + "protected", + new DiagnosticResult[] + { + new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) + .WithLocation(0) + .WithArguments("Test.IComInterface", "protected") + }, + ID() + ), + ( + "private", + new DiagnosticResult[] + { + new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) + .WithLocation(0) + .WithArguments("Test.IComInterface", "private") + }, + ID() + ), + }; + foreach (var (interfaceVisibility, diagnostics, id) in group) + { + var source = $$""" + using System; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + public static unsafe partial class Test { + [GeneratedComInterface] + [Guid("B585EEFE-85B2-45BA-935E-C993C81D038C")] + {{interfaceVisibility}} partial interface {|#{{0}}:IComInterface|} + { + public int Get(); + public void Set(int value); + } + } + """; + yield return new object[] { id, source, diagnostics }; + } + } + public static IEnumerable StringMarshallingCustomTypeVisibilities() + { + var emptyDiagnostics = new DiagnosticResult[] { }; + var diagnostic = new DiagnosticResult[]{ + new DiagnosticResult(GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode) + .WithLocation(0) + .WithArguments("Test.CustomStringMarshallingType") + }; + + var group = new List<(string, string, DiagnosticResult[], string)>() + { + ("public", "public", emptyDiagnostics, ID()), + // Technically we don't support inheriting from a GeneratedComInterface from another assembly, so this should be okay + ("public", "internal", emptyDiagnostics, ID()), + ("public", "protected", diagnostic, ID()), + ("public", "private", diagnostic, ID()), + ("internal", "public", emptyDiagnostics, ID()), + ("internal", "internal", emptyDiagnostics, ID()), + ("internal", "protected", diagnostic, ID()), + ("internal", "private", diagnostic, ID()), + }; + foreach (var (interfaceVisibility, customTypeVisibility, diagnostics, id) in group) + { var source = $$""" - public static class Program { - [System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(string), MarshalMode.Default, typeof(CustomStringMarshallingType))] - {{customTypeVisibility}} class CustomStringMarshallingType + using System; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + public static unsafe partial class Test { + [CustomMarshaller(typeof(string), MarshalMode.Default, typeof(CustomStringMarshallingType))] + {{customTypeVisibility}} static class CustomStringMarshallingType { - public static string? ConvertToManaged(ushort* unmanaged) => throw new NotImplementedException(); - public static ushort* ConvertToUnmanaged(string? managed) => throw new NotImplementedException(); + public static string ConvertToManaged(ushort* unmanaged) => throw new NotImplementedException(); + public static ushort* ConvertToUnmanaged(string managed) => throw new NotImplementedException(); public static void Free(ushort* unmanaged) => throw new NotImplementedException(); - public static ref readonly char GetPinnableReference(string? str) => throw new NotImplementedException(); + public static ref readonly char GetPinnableReference(string str) => throw new NotImplementedException(); } - [System.Runtime.InteropServices.Marshalling.GeneratedComInterface(StringMarshalling.Custom, typeof(CustomStringMarshallingType)] + [GeneratedComInterface(StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(CustomStringMarshallingType))] + [Guid("B585EEFE-85B2-45BA-935E-C993C81D038C")] {{interfaceVisibility}} partial interface {|#{{0}}:IStringMarshalling|} { public string GetString(); @@ -467,11 +523,26 @@ public static class Program { } } """; - - await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics); + yield return new object[] { id, source, diagnostics }; } } + [Theory] + [MemberData(nameof(StringMarshallingCustomTypeVisibilities))] + public async Task VerifyStringMarshallingCustomTypeWithLessVisibilityThanInterfaceWarns(string id, string source, DiagnosticResult[] diagnostics) + { + _ = id; + await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics); + } + + [Theory] + [MemberData(nameof(InterfaceVisibilities))] + public async Task VerifyInterfaceWithLessVisibilityThanInterfaceWarns(string id, string source, DiagnosticResult[] diagnostics) + { + _ = id; + await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics); + } + [Fact] public async Task VerifyComInterfaceInheritingFromComInterfaceInOtherAssemblyReportsDiagnostic() { From 0bd13f634782182aecd6ae7a0495089376db1031 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Wed, 7 Jun 2023 17:13:03 -0700 Subject: [PATCH 11/16] Add comment, fix typo --- .../gen/ComInterfaceGenerator/ComInterfaceInfo.cs | 3 ++- .../Microsoft.Interop.SourceGeneration/DiagnosticOr.cs | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 9a5ecbb7723c80..906552b0bce1b3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -59,6 +59,7 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD } } + // a higher enum value is more accessible if (symbol.DeclaredAccessibility - Accessibility.Internal < 0) { return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create( @@ -106,7 +107,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD SR.InvalidStringMarshallingConfigurationMissingCustomType); return false; } - // higher enum value is more accessible + // a higher enum value is more accessible if (attrInfo.StringMarshallingCustomTypeAccessibility - Accessibility.Internal < 0) { stringMarshallingDiagnostic = DiagnosticInfo.Create( diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs index c95b61c7622c4a..160f62b6bb800e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/DiagnosticOr.cs @@ -5,12 +5,8 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Linq; -using System.Runtime.InteropServices.ComTypes; -using System.Text; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; namespace Microsoft.Interop { @@ -90,7 +86,7 @@ private sealed record ValueAndDiagnostic : DiagnosticOr /// /// Create a Diagnostic variant /// - public static DiagnosticOr From(params DiagnosticInfo[] diagnostic) + public static DiagnosticOr From(DiagnosticInfo diagnostic) { return new Diag(ImmutableArray.Create(diagnostic)); } @@ -118,7 +114,7 @@ public static DiagnosticOr From(T value, params DiagnosticInfo[] diagnostics) public static class DiagnosticOrTHelperExtensions { /// - /// Splits the elements of into a "values" provider and a "diagnositics" provider. + /// Splits the elements of into a values provider and a diagnostics provider. /// public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider> provider) { From 6fe867e7b293ffb9b03ae2bc790f9e0a12e8c8ef Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Mon, 12 Jun 2023 16:04:38 -0700 Subject: [PATCH 12/16] Use shared IsAccessibleFromGeneratedCode method --- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 25 ++++---- .../Resources/Strings.resx | 62 ++++++++++--------- .../ISymbolExtensions.cs | 36 +++++++++++ .../Resources/Strings.resx | 6 ++ 4 files changed, 86 insertions(+), 43 deletions(-) create mode 100644 src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ISymbolExtensions.cs diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index e7f2039bb23ca2..33485a632561b1 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.Interop; using DiagnosticOrInterfaceInfo = Microsoft.Interop.DiagnosticOr<(Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol)>; namespace Microsoft.Interop @@ -44,14 +43,13 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD if (!IsInPartialContext(symbol, syntax, out DiagnosticInfo? partialContextDiagnostic)) return DiagnosticOrInterfaceInfo.From(partialContextDiagnostic); - // a higher enum value is more accessible - if (symbol.DeclaredAccessibility - Accessibility.Internal < 0) + if (!symbol.IsAccessibleFromFileScopedClass(out var details)) { return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create( GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, - symbol.Locations[0], + syntax.GetLocation(), symbol.ToDisplayString(), - symbol.DeclaredAccessibility.ToString().ToLowerInvariant())); + details)); } if (!TryGetGuid(symbol, syntax, out Guid? guid, out DiagnosticInfo? guidDiagnostic)) @@ -84,10 +82,10 @@ private static bool IsInPartialContext(INamedTypeSymbol symbol, InterfaceDeclara if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword)) { diagnostic = DiagnosticInfo.Create( - GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers, - syntax.Identifier.GetLocation(), - symbol.Name, - typeDecl.Identifier); + GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers, + syntax.Identifier.GetLocation(), + symbol.Name, + typeDecl.Identifier); return false; } } @@ -97,7 +95,8 @@ private static bool IsInPartialContext(INamedTypeSymbol symbol, InterfaceDeclara private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, INamedTypeSymbol? baseSymbol, [NotNullWhen(false)] out DiagnosticInfo? stringMarshallingDiagnostic) { - var attrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol)); + var attrSymbolInfo = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol); + var attrInfo = GeneratedComInterfaceData.From(attrSymbolInfo); if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) { if (attrInfo.StringMarshalling is StringMarshalling.Custom) @@ -111,13 +110,13 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD SR.InvalidStringMarshallingConfigurationMissingCustomType); return false; } - // a higher enum value is more accessible - if (attrInfo.StringMarshallingCustomTypeAccessibility - Accessibility.Internal < 0) + if (!attrSymbolInfo.StringMarshallingCustomType.IsAccessibleFromFileScopedClass(out var details)) { stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode, syntax.Identifier.GetLocation(), - attrInfo.StringMarshallingCustomType.FullTypeName.Replace("global::", "")); + attrInfo.StringMarshallingCustomType.FullTypeName.Replace("global::", ""), + details); return false; } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx index d96690da8641f6..2f157634bae37c 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx @@ -1,17 +1,17 @@  - @@ -268,10 +268,12 @@ The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} - Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but has accessibility '{1}'. The interface must have accessibility 'internal' or 'public' for generated code to access it. Code will not be generated for '{0}'. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is not accessible by generated code. The interface and all containing types must have accessibility 'internal' or 'public' for generated code to access it. {1} + {1} is details about which type/containing type is not accessible - The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. Code will not be generated for '{0}'. + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. {1} + {1} is details about which type/containing type is not accessible GeneratedComInterfaceAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. @@ -342,4 +344,4 @@ Converting this interface to use 'GeneratedComInterfaceAttribute' may produce invalid code and may require additional work - + \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ISymbolExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ISymbolExtensions.cs new file mode 100644 index 00000000000000..c8fc383f4d501a --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/ISymbolExtensions.cs @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.CodeAnalysis; + +namespace Microsoft.Interop +{ + public static class ISymbolExtensions + { + /// + /// Returns true if is as accessible or more accessible than + /// + public static bool IsAccessibleFromFileScopedClass(this INamedTypeSymbol symbol, [NotNullWhen(false)] out string? details) + { + // a higher enum value is more accessible + if (symbol.DeclaredAccessibility - Accessibility.Internal < 0) + { + details = string.Format(SR.TypeAccessibilityDetails, symbol.ToDisplayString(), symbol.DeclaredAccessibility.ToString().ToLowerInvariant()); + return false; + } + for (ISymbol current = symbol.ContainingSymbol; current is INamedTypeSymbol currentType; current = currentType.ContainingSymbol) + { + // a higher enum value is more accessible + if (current.DeclaredAccessibility - Accessibility.Internal < 0) + { + details = string.Format(SR.ContainingTypeAccessibilityDetails, current.ToDisplayString(), current.DeclaredAccessibility.ToString().ToLowerInvariant()); + return false; + } + } + details = null; + return true; + } + } +} diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/Strings.resx index 229bda1f7bc721..8b3acf75b0189b 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Resources/Strings.resx @@ -186,4 +186,10 @@ All marshallers for values that are passed as the unmanaged return value must have the same unmanaged type. + + Containing type '{0}' has accessibility '{1}'. + + + '{0}' has accessibility '{1}'. + \ No newline at end of file From 3b7c3addd430264bb443493e1840242b40af03ef Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Tue, 13 Jun 2023 12:18:01 -0700 Subject: [PATCH 13/16] Report warning on identifier and add expected diagnostic arguments --- .../System.Runtime.InteropServices.sln | 321 +++++++++--------- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 2 +- .../IDerivedTests.cs | 3 - .../CompileFails.cs | 48 ++- 4 files changed, 185 insertions(+), 189 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln index 949db1c9715341..ae26961c114103 100644 --- a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln +++ b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln @@ -1,4 +1,8 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.33729.141 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{94B59BA0-491F-4B59-ADFF-A057EC3EC835}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}" @@ -63,6 +67,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E1AEBD5D-AE4 EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 Debug|Any CPU = Debug|Any CPU Debug|arm = Debug|arm Debug|arm64 = Debug|arm64 @@ -73,13 +82,18 @@ Global Release|arm64 = Release|arm64 Release|x64 = Release|x64 Release|x86 = Release|x86 - Checked|Any CPU = Checked|Any CPU - Checked|arm = Checked|arm - Checked|arm64 = Checked|arm64 - Checked|x64 = Checked|x64 - Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.ActiveCfg = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.Build.0 = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|arm.ActiveCfg = Debug|arm @@ -100,16 +114,11 @@ Global {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x64.Build.0 = Release|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.ActiveCfg = Release|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.Build.0 = Release|x86 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -126,11 +135,11 @@ Global {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x64.Build.0 = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.ActiveCfg = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.Build.0 = Release|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -147,11 +156,11 @@ Global {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x64.Build.0 = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.ActiveCfg = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.Build.0 = Release|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.Build.0 = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -168,11 +177,11 @@ Global {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x64.Build.0 = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x86.ActiveCfg = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x86.Build.0 = Release|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -189,11 +198,11 @@ Global {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x64.Build.0 = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.ActiveCfg = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.Build.0 = Release|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -210,11 +219,11 @@ Global {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x64.Build.0 = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.ActiveCfg = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.Build.0 = Release|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -231,11 +240,11 @@ Global {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x64.Build.0 = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.ActiveCfg = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.Build.0 = Release|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.Build.0 = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -252,11 +261,11 @@ Global {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x64.Build.0 = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x86.ActiveCfg = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x86.Build.0 = Release|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -273,11 +282,11 @@ Global {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x64.Build.0 = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.ActiveCfg = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.Build.0 = Release|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x64.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x86.ActiveCfg = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -294,11 +303,11 @@ Global {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x64.Build.0 = Release|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.ActiveCfg = Release|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.Build.0 = Release|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x64.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x86.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x86.ActiveCfg = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -315,11 +324,11 @@ Global {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x64.Build.0 = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x86.ActiveCfg = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x86.Build.0 = Release|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.Build.0 = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -336,11 +345,11 @@ Global {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x64.Build.0 = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.ActiveCfg = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.Build.0 = Release|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.Build.0 = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -357,11 +366,11 @@ Global {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x64.Build.0 = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.ActiveCfg = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.Build.0 = Release|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -378,11 +387,11 @@ Global {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x64.Build.0 = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.ActiveCfg = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.Build.0 = Release|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -399,11 +408,11 @@ Global {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x64.Build.0 = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.ActiveCfg = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.Build.0 = Release|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.Build.0 = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -420,11 +429,11 @@ Global {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x64.Build.0 = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.ActiveCfg = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.Build.0 = Release|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -441,11 +450,11 @@ Global {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x64.Build.0 = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.ActiveCfg = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.Build.0 = Release|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -462,11 +471,11 @@ Global {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x64.Build.0 = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x86.ActiveCfg = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x86.Build.0 = Release|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.Build.0 = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -483,11 +492,11 @@ Global {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x64.Build.0 = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.ActiveCfg = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.Build.0 = Release|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.Build.0 = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -504,11 +513,11 @@ Global {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x64.Build.0 = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.ActiveCfg = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.Build.0 = Release|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -525,11 +534,11 @@ Global {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x64.Build.0 = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.ActiveCfg = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.Build.0 = Release|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -546,11 +555,11 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x64.Build.0 = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.ActiveCfg = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.Build.0 = Release|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.Build.0 = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -567,11 +576,11 @@ Global {866D295E-424A-4747-9417-CD7746936138}.Release|x64.Build.0 = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Release|x86.ActiveCfg = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Release|x86.Build.0 = Release|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|arm.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -588,11 +597,11 @@ Global {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x64.Build.0 = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.ActiveCfg = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.Build.0 = Release|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -609,11 +618,11 @@ Global {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x64.Build.0 = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.ActiveCfg = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.Build.0 = Release|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -630,11 +639,11 @@ Global {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x64.Build.0 = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.ActiveCfg = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.Build.0 = Release|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -651,23 +660,26 @@ Global {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x64.Build.0 = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.ActiveCfg = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.Build.0 = Release|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {94B59BA0-491F-4B59-ADFF-A057EC3EC835} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {C4B641C3-3317-4913-91DA-0DA3B64BABED} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {716ED44B-37C8-4776-BE70-285952D2B30D} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {3741C833-C364-4269-9B1D-D442055DA7CE} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {1D771995-D475-429B-AC31-2B1F618AA45F} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} @@ -677,19 +689,14 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {866D295E-424A-4747-9417-CD7746936138} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {0B5FD0C2-367D-4AD6-8001-80AD79B2441C} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {C7DAC270-CC93-4C97-9A8D-6E724A10727D} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D4031401-FEB5-4CCF-91C1-38F5646B2BFD} EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{94b59ba0-491f-4b59-adff-a057ec3ec835}*SharedItemsImports = 5 + EndGlobalSection EndGlobal diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 33485a632561b1..004d07f69a48bc 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -47,7 +47,7 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD { return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create( GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible, - syntax.GetLocation(), + syntax.Identifier.GetLocation(), symbol.ToDisplayString(), details)); } diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Tests/IDerivedTests.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Tests/IDerivedTests.cs index 68c7420d0b3cbc..e457a287748bc3 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Tests/IDerivedTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Tests/IDerivedTests.cs @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; -using System.Text; -using System.Threading.Tasks; using SharedTypes.ComInterfaces; using Xunit; diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index 2e37b1c47d3394..31955ab1cf3490 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -419,36 +419,23 @@ partial interface {|#0:IFoo2|} public static IEnumerable InterfaceVisibilities() { var emptyDiagnostics = new DiagnosticResult[] { }; - var diagnostic = new DiagnosticResult[]{ + var privateDiagnostic = new DiagnosticResult[]{ new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) .WithLocation(0) - .WithArguments("Test.IStringMarshalling") + .WithArguments("Test.IComInterface", "'Test.IComInterface' has accessibility 'private'.") + }; + var protectedDiagnostic = new DiagnosticResult[]{ + new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) + .WithLocation(0) + .WithArguments("Test.IComInterface", "'Test.IComInterface' has accessibility 'protected'.") }; var group = new List<(string, DiagnosticResult[], string)>() { ("public", emptyDiagnostics, ID()), ("internal", emptyDiagnostics, ID()), - ( - "protected", - new DiagnosticResult[] - { - new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) - .WithLocation(0) - .WithArguments("Test.IComInterface", "protected") - }, - ID() - ), - ( - "private", - new DiagnosticResult[] - { - new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceNotAccessible) - .WithLocation(0) - .WithArguments("Test.IComInterface", "private") - }, - ID() - ), + ("protected", protectedDiagnostic, ID()), + ("private", privateDiagnostic, ID()), }; foreach (var (interfaceVisibility, diagnostics, id) in group) { @@ -474,10 +461,15 @@ public static unsafe partial class Test { public static IEnumerable StringMarshallingCustomTypeVisibilities() { var emptyDiagnostics = new DiagnosticResult[] { }; - var diagnostic = new DiagnosticResult[]{ + var privateDiagnostic = new DiagnosticResult[]{ + new DiagnosticResult(GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode) + .WithLocation(0) + .WithArguments("Test.CustomStringMarshallingType", "'Test.CustomStringMarshallingType' has accessibility 'private'.") + }; + var protectedDiagnostic = new DiagnosticResult[]{ new DiagnosticResult(GeneratorDiagnostics.StringMarshallingCustomTypeNotAccessibleByGeneratedCode) .WithLocation(0) - .WithArguments("Test.CustomStringMarshallingType") + .WithArguments("Test.CustomStringMarshallingType", "'Test.CustomStringMarshallingType' has accessibility 'protected'.") }; var group = new List<(string, string, DiagnosticResult[], string)>() @@ -485,12 +477,12 @@ public static IEnumerable StringMarshallingCustomTypeVisibilities() ("public", "public", emptyDiagnostics, ID()), // Technically we don't support inheriting from a GeneratedComInterface from another assembly, so this should be okay ("public", "internal", emptyDiagnostics, ID()), - ("public", "protected", diagnostic, ID()), - ("public", "private", diagnostic, ID()), + ("public", "protected", protectedDiagnostic, ID()), + ("public", "private", privateDiagnostic, ID()), ("internal", "public", emptyDiagnostics, ID()), ("internal", "internal", emptyDiagnostics, ID()), - ("internal", "protected", diagnostic, ID()), - ("internal", "private", diagnostic, ID()), + ("internal", "protected", protectedDiagnostic, ID()), + ("internal", "private", privateDiagnostic, ID()), }; foreach (var (interfaceVisibility, customTypeVisibility, diagnostics, id) in group) { From bbfde847068bfb5e1eceb18583ca70a9119c85e9 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Tue, 13 Jun 2023 15:25:19 -0700 Subject: [PATCH 14/16] Cleanup after merge --- .../ComInterfaceGenerator/ComInterfaceInfo.cs | 22 +++++++++++-------- .../GeneratedComInterfaceAttributeData.cs | 5 +---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 2327a58103aca0..4f207ce6c80c61 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -89,9 +89,13 @@ private static bool IsInPartialContext(INamedTypeSymbol symbol, InterfaceDeclara return true; } - private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, INamedTypeSymbol? baseSymbol, [NotNullWhen(false)] out DiagnosticInfo? stringMarshallingDiagnostic) + private static bool StringMarshallingIsValid( + INamedTypeSymbol interfaceSymbol, + InterfaceDeclarationSyntax syntax, + INamedTypeSymbol? baseInterfaceSymbol, + [NotNullWhen(false)] out DiagnosticInfo? stringMarshallingDiagnostic) { - var attrSymbolInfo = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol); + var attrSymbolInfo = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(interfaceSymbol); var attrInfo = GeneratedComInterfaceData.From(attrSymbolInfo); if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) { @@ -102,7 +106,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), + interfaceSymbol.ToDisplayString(), SR.InvalidStringMarshallingConfigurationMissingCustomType); return false; } @@ -116,19 +120,19 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD return false; } } - if (attrInfo.StringMarshalling is not StringMarshalling.Custom && attrInfo.StringMarshallingCustomType is not null) + else if (attrInfo.StringMarshallingCustomType is not null) { stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingConfigurationOnInterface, syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), + interfaceSymbol.ToDisplayString(), SR.InvalidStringMarshallingConfigurationNotCustom); return false; } } - if (baseSymbol is not null) + if (baseInterfaceSymbol is not null) { - var baseAttrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(baseSymbol)); + var baseAttrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(baseInterfaceSymbol)); // The base can be undefined string marshalling if ((baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) && baseAttrInfo != attrInfo) @@ -136,7 +140,7 @@ private static bool StringMarshallingIsValid(INamedTypeSymbol symbol, InterfaceD stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, syntax.Identifier.GetLocation(), - symbol.ToDisplayString(), + interfaceSymbol.ToDisplayString(), SR.GeneratedComInterfaceStringMarshallingMustMatchBase); return false; } @@ -180,7 +184,7 @@ private static bool TryGetGuid(INamedTypeSymbol interfaceSymbol, InterfaceDeclar { guid = null; AttributeData? guidAttr = null; - AttributeData? _ = null; // Interface Attribute Type. We'll always assume IUnkown for now. + AttributeData? _ = null; // Interface Attribute Type. We'll always assume IUnknown for now. foreach (var attr in interfaceSymbol.GetAttributes()) { var attrDisplayString = attr.AttributeClass?.ToDisplayString(); diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs index 58436d0d7ae98d..36095b71086973 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Editing; namespace Microsoft.Interop { @@ -15,7 +14,6 @@ namespace Microsoft.Interop /// internal sealed record GeneratedComInterfaceData : InteropAttributeData { - public Accessibility? StringMarshallingCustomTypeAccessibility { get; init; } public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationData generatedComInterfaceAttr) => new GeneratedComInterfaceData() with { @@ -24,8 +22,7 @@ public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationDat StringMarshalling = generatedComInterfaceAttr.StringMarshalling, StringMarshallingCustomType = generatedComInterfaceAttr.StringMarshallingCustomType is not null ? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(generatedComInterfaceAttr.StringMarshallingCustomType) - : null, - StringMarshallingCustomTypeAccessibility = generatedComInterfaceAttr.StringMarshallingCustomType?.DeclaredAccessibility + : null }; } From 913e8e90fffd847f8e8de7b14771f5edb0b98117 Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Tue, 13 Jun 2023 15:51:09 -0700 Subject: [PATCH 15/16] Revert solution to main --- .../System.Runtime.InteropServices.sln | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln index ae26961c114103..bf6da1f62d804c 100644 --- a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln +++ b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.7.33729.141 +VisualStudioVersion = 17.4.32915.420 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{94B59BA0-491F-4B59-ADFF-A057EC3EC835}" EndProject From 97249714f529809bb64495cb214d8f4510ed74ee Mon Sep 17 00:00:00 2001 From: Jackson Schuster Date: Tue, 13 Jun 2023 15:54:36 -0700 Subject: [PATCH 16/16] Revert solution to upstream/main --- .../System.Runtime.InteropServices.sln | 321 +++++++++--------- 1 file changed, 157 insertions(+), 164 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln index bf6da1f62d804c..949db1c9715341 100644 --- a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln +++ b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln @@ -1,8 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.32915.420 -MinimumVisualStudioVersion = 10.0.40219.1 +Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{94B59BA0-491F-4B59-ADFF-A057EC3EC835}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}" @@ -67,11 +63,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E1AEBD5D-AE4 EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Checked|Any CPU = Checked|Any CPU - Checked|arm = Checked|arm - Checked|arm64 = Checked|arm64 - Checked|x64 = Checked|x64 - Checked|x86 = Checked|x86 Debug|Any CPU = Debug|Any CPU Debug|arm = Debug|arm Debug|arm64 = Debug|arm64 @@ -82,18 +73,13 @@ Global Release|arm64 = Release|arm64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.ActiveCfg = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.Build.0 = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|arm.ActiveCfg = Debug|arm @@ -114,11 +100,16 @@ Global {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x64.Build.0 = Release|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.ActiveCfg = Release|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.Build.0 = Release|x86 - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -135,11 +126,11 @@ Global {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x64.Build.0 = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.ActiveCfg = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.Build.0 = Release|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -156,11 +147,11 @@ Global {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x64.Build.0 = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.ActiveCfg = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.Build.0 = Release|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.Build.0 = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -177,11 +168,11 @@ Global {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x64.Build.0 = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x86.ActiveCfg = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x86.Build.0 = Release|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -198,11 +189,11 @@ Global {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x64.Build.0 = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.ActiveCfg = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.Build.0 = Release|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -219,11 +210,11 @@ Global {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x64.Build.0 = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.ActiveCfg = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.Build.0 = Release|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -240,11 +231,11 @@ Global {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x64.Build.0 = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.ActiveCfg = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.Build.0 = Release|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.Build.0 = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -261,11 +252,11 @@ Global {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x64.Build.0 = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x86.ActiveCfg = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x86.Build.0 = Release|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -282,11 +273,11 @@ Global {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x64.Build.0 = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.ActiveCfg = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.Build.0 = Release|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x64.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x86.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -303,11 +294,11 @@ Global {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x64.Build.0 = Release|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.ActiveCfg = Release|Any CPU {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Release|x86.Build.0 = Release|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x64.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|x86.ActiveCfg = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -324,11 +315,11 @@ Global {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x64.Build.0 = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x86.ActiveCfg = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x86.Build.0 = Release|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x86.ActiveCfg = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|Any CPU.Build.0 = Debug|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -345,11 +336,11 @@ Global {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x64.Build.0 = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.ActiveCfg = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.Build.0 = Release|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|Any CPU.Build.0 = Debug|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -366,11 +357,11 @@ Global {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x64.Build.0 = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.ActiveCfg = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.Build.0 = Release|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -387,11 +378,11 @@ Global {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x64.Build.0 = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.ActiveCfg = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.Build.0 = Release|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -408,11 +399,11 @@ Global {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x64.Build.0 = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.ActiveCfg = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.Build.0 = Release|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|Any CPU.Build.0 = Debug|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -429,11 +420,11 @@ Global {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x64.Build.0 = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.ActiveCfg = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.Build.0 = Release|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -450,11 +441,11 @@ Global {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x64.Build.0 = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.ActiveCfg = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.Build.0 = Release|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -471,11 +462,11 @@ Global {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x64.Build.0 = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x86.ActiveCfg = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x86.Build.0 = Release|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|Any CPU.Build.0 = Debug|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -492,11 +483,11 @@ Global {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x64.Build.0 = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.ActiveCfg = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.Build.0 = Release|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|Any CPU.Build.0 = Debug|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -513,11 +504,11 @@ Global {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x64.Build.0 = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.ActiveCfg = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.Build.0 = Release|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -534,11 +525,11 @@ Global {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x64.Build.0 = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.ActiveCfg = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.Build.0 = Release|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -555,11 +546,11 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x64.Build.0 = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.ActiveCfg = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.Build.0 = Release|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|arm.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|Any CPU.Build.0 = Debug|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -576,11 +567,11 @@ Global {866D295E-424A-4747-9417-CD7746936138}.Release|x64.Build.0 = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Release|x86.ActiveCfg = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Release|x86.Build.0 = Release|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -597,11 +588,11 @@ Global {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x64.Build.0 = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.ActiveCfg = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.Build.0 = Release|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -618,11 +609,11 @@ Global {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x64.Build.0 = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.ActiveCfg = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.Build.0 = Release|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -639,11 +630,11 @@ Global {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x64.Build.0 = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.ActiveCfg = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.Build.0 = Release|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -660,26 +651,23 @@ Global {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x64.Build.0 = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.ActiveCfg = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.Build.0 = Release|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {94B59BA0-491F-4B59-ADFF-A057EC3EC835} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {C4B641C3-3317-4913-91DA-0DA3B64BABED} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {716ED44B-37C8-4776-BE70-285952D2B30D} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {3741C833-C364-4269-9B1D-D442055DA7CE} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {1D771995-D475-429B-AC31-2B1F618AA45F} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} @@ -689,14 +677,19 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {866D295E-424A-4747-9417-CD7746936138} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {0B5FD0C2-367D-4AD6-8001-80AD79B2441C} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} {C7DAC270-CC93-4C97-9A8D-6E724A10727D} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D4031401-FEB5-4CCF-91C1-38F5646B2BFD} EndGlobalSection - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{94b59ba0-491f-4b59-adff-a057ec3ec835}*SharedItemsImports = 5 - EndGlobalSection EndGlobal