FXCOP lance une exception sur la ligne de commande, mais pas dans l'interface graphique?

StackOverflow https://stackoverflow.com/questions/7432226

  •  31-10-2019
  •  | 
  •  

Question

J'ai un projet FXCOP 10.0 qui s'exécute bien via l'interface graphique FXCOP, mais lorsque je l'exécute dans l'application FXCOPCMD de commande (que je souhaite utiliser dans le cadre de notre processus de construction automatisé), il génère l'exception suivante - apparemment en essayant de charger assemblages.

  <Exception Keyword="CA0001" Kind="Engine">
   <Type>System.InvalidOperationException</Type>
   <ExceptionMessage>Collection was modified; enumeration operation may not execute </ExceptionMessage>
   <StackTrace>   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at Microsoft.FxCop.Sdk.WeakAssemblyReference.FindMatchingReference(WeakAssemblyReference faRef, AssemblyReferenceCollection references, Hashtable cache)
   at Microsoft.FxCop.Sdk.WeakAssemblyReference.Initialize()
   at Microsoft.FxCop.Sdk.FrameworkAssemblies.GetFrameworkAssemblyReference(WeakAssemblyReference&amp; assemblyRef, String assemblyName)
   at Microsoft.FxCop.Sdk.FrameworkAssemblies.get_SystemCore()
   at Microsoft.FxCop.Sdk.FrameworkTypes.get_DynamicAttribute()
   at Microsoft.FxCop.Sdk.INodeWrappers.CCIParameterWrapper.get_DynamicTypes()
   at Microsoft.FxCop.Sdk.INodeWrappers.CCIParameterWrapper.get_Type()
   at Microsoft.FxCop.Sdk.NameProviders.NameProvider.WriteCommaSeparatedParameters(INodeCollection`1 parameters)
   at Microsoft.FxCop.Sdk.NameProviders.NameProvider.WriteMethodParameters(IMethodNode method)
   at Microsoft.FxCop.Sdk.NameProviders.NameProvider.WriteMethod(IMethodNode method)
   at Microsoft.FxCop.Sdk.NameProviders.CodeWriter.WriteCore(INode node)
   at Microsoft.FxCop.Sdk.NameProviders.NameProvider.WriteCore(INode node)
   at Microsoft.FxCop.Sdk.NameProviders.NameProvider.GetName(INode node)
   at Microsoft.FxCop.Engines.Introspection.Persistence.GetName(Node node, NameStyle style)
   at Microsoft.FxCop.Engines.Introspection.BaseVisitor.FindTargetMember(Member member, TargetMemberDictionary targets)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.FindTargetMember(Member member, TargetMemberDictionary targets)
   at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitMembers(MemberCollection members, TargetMemberDictionary targets, Boolean visitNestedTypes)
   at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitType(TypeNode type, TargetType target)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitType(TypeNode type, TargetType target)
   at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitTypes(TypeNodeCollection types, TargetNamespaceDictionary targets)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitModule(ModuleNode module, TargetModule target)
   at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.Load(TargetFile target, Boolean buildTree, Boolean queueItems, AssemblyNode loadedAssembly)
   at Microsoft.FxCop.Engines.Introspection.LoadVisitor.LoadAssemblies(Queue queue, ExceptionCollection exceptions)</StackTrace>
  </Exception>

Je ne trouve rien de révélant sur Google, alors quelqu'un a-t-il des idées ce qui pourrait provoquer cela?

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top