Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentException on Mono: Type passed in must be derived from System.Attribute or System.Attribute itself #32744

Closed
akoeplinger opened this issue Feb 24, 2020 · 3 comments · Fixed by #38658
Labels
runtime-mono specific to the Mono runtime
Milestone

Comments

@akoeplinger
Copy link
Member

System.ComponentModel.Composition.Registration.Tests.ExportBuilderUnitTests.ExportInheritedInterfaceWithImplements1 [FAIL]
        System.ArgumentException : Type passed in must be derived from System.Attribute or System.Attribute itself. System.ComponentModel.Composition.IAttributedImport
        Stack Trace:
          /Users/alexander/dev/runtime/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs(543,0): at System.Reflection.CustomAttribute.IsDefined(ICustomAttributeProvider obj, Type attributeType, Boolean inherit)
          /Users/alexander/dev/runtime/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs(182,0): at System.Reflection.RuntimeFieldInfo.IsDefined(Type attributeType, Boolean inherit)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/Microsoft/Internal/AttributeServices.cs(39,0): at Microsoft.Internal.AttributeServices.IsAttributeDefined[IAttributedImport](ICustomAttributeProvider attributeProvider, Boolean inherit)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(507,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsImport(ICustomAttributeProvider attributeProvider)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(489,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.GetDeclaredOnlyImportMembers(Type type)+MoveNext()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(458,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.GetImportMembers(Type type)+MoveNext()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(431,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.GetImportDefinitions()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(262,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.DiscoverExportsAndImports()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs(73,0): at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.GetImports()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePartDefinition.cs(94,0): at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePartDefinition.get_ImportDefinitions()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs(136,0): at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.get_ImportDefinitions()
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs(345,0): at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs(437,0): at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ImportEngine.cs(209,0): at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(ComposablePart part)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionContainer.cs(557,0): at System.ComponentModel.Composition.Hosting.CompositionContainer.SatisfyImportsOnce(ComposablePart part)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModelServices.cs(184,0): at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOnce(ICompositionService compositionService, Object attributedPart)
          /Users/alexander/dev/runtime/src/libraries/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderUnitTests.cs(110,0): at System.ComponentModel.Composition.Registration.Tests.ExportBuilderUnitTests.ExportInheritedInterfaceWithImplements1()
@akoeplinger akoeplinger added area-CoreLib-mono runtime-mono specific to the Mono runtime labels Feb 24, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 24, 2020
@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Jun 30, 2020
@marek-safar marek-safar added this to the 6.0.0 milestone Jun 30, 2020
@marek-safar
Copy link
Contributor

@lambdageek / @CoffeeFlux I recall seeing fixing in this space. Could you check if this issue does still exist?

@CoffeeFlux
Copy link
Contributor

Yeah, I should have fixed all the issues of this class. If no one else gets a chance, I'll check the test to re-enable it next sprint.

@akoeplinger
Copy link
Member Author

I tried and they seem to be passing, opened #38658 to reenable.

akoeplinger added a commit that referenced this issue Jul 1, 2020
kevinwkt pushed a commit to kevinwkt/runtimelab that referenced this issue Jul 15, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
runtime-mono specific to the Mono runtime
Projects
None yet
4 participants