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

Export error: Ambiguous match found for 'CasCap.Models.TriggerAzDO Boolean batch' #216

Open
rfennell opened this issue May 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rfennell
Copy link

Key

  • Share your full command line to execute the tool taking care to redact anything private!

yamlizr generate -pat <PAT> -org https://dev.azure.com/myorg -proj myproj -out c:\tmp\export

  • Confirm which version of the tool you are using.
  • 3.01 but replicated using clone of repo

Describe the bug
When I do an export of an AzDo project with a pair of CIassic builds and a pair of Classic releases I get the error

Connecting to DevOps REST API, https://dev.azure.com/myorg ... connected :)
Retrieving Azure DevOps Project 'myproject' ...  retrieved :)
Pre-loading relevant Azure DevOps objects, this may take some time...
100.00% 2 build definition reference(s) retrieved.
info: CasCap.Services.ApiService[0]
Retrieving all extensions for organisation 'https://dev.azure.com/myproject'
100.00% Retrieved 2 of 2 full build definition(s). 
100.00% YamlPipelineGenerator processed 2 of 2 build definition(s).
100.00% YamlPipelineGenerator processed 2 of 2 release definition(s).

Unhandled exception. System.Reflection.AmbiguousMatchException: Ambiguous match found for 'CasCap.Models.TriggerAzDO Boolean batch'.  at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetProperty(String name, BindingFlags bindingAttr)
   at YamlDotNet.ReflectionExtensions.GetPublicProperty(Type type, String name)
   at YamlDotNet.ReflectionExtensions.GetAllCustomAttributes[TAttribute](PropertyInfo member)
   at YamlDotNet.Serialization.TypeInspectors.ReadablePropertiesTypeInspector.ReflectionPropertyDescriptor.GetCustomAttribute[T]()
   at YamlDotNet.Serialization.YamlAttributeOverridesInspector.OverridePropertyDescriptor.GetCustomAttribute[T]()
   at YamlDotNet.Serialization.YamlAttributesTypeInspector.<>c.<GetProperties>b__2_0(IPropertyDescriptor p)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToList()
   at YamlDotNet.Serialization.TypeInspectors.CachedTypeInspector.<>c__DisplayClass3_0.<GetProperties>b__0(Type t)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at YamlDotNet.Serialization.TypeInspectors.CachedTypeInspector.GetProperties(Type type, Object container)
   at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext]

To Reproduce

  1. Run the export command
  2. Error is seen
  3. Folders are created, but no files are export

Expected behavior
YAML export should occur

Screenshots
NA

Desktop (please complete the following information):

  • OS: WIndows 11
  • .NET or .NET Core SDK Version 8.0.300

Additional context
PR on the way

@joshhenrich
Copy link

Also running into this issue

@levimayer21
Copy link

levimayer21 commented Oct 24, 2024

Yep, same here. #217 solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants