2011-09-15 3 views
1

FxCop GUI를 통해 정상적으로 실행되는 FxCop 10.0 프로젝트를 만들었지 만 FxCopCmd 명령 줄 앱 (자동 빌드 프로세스의 일부로 사용하고 싶음)을 실행할 때 다음과 같은 예외가 발생합니다. 어셈블리를로드하는 데 사용됩니다.FxCop이 명령 줄에서는 예외를 발생 시키지만 GUI에서는 예외를 발생시키지 않습니까?

<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> 

나는 Google에서 어떤 것도 발견 할 수 없으므로 누구에게이 문제를 일으킬 수있는 아이디어가 있습니까?

답변

1

10.0 파일에서 FxCop 1.36을 실행하려고했기 때문입니다. 우리 단위 테스트 코드는 두 개의 서로 다른 폴더에서 FxCop을 찾으려고했는데 그 중 하나만 업데이트했습니다 : (

1

UI 및 명령 줄 실행에 동일한 .fxcop 프로젝트 파일을 사용하고 있습니까? 그렇지 않은 경우 FxCop UI 설정에서 다중 스레드 로딩을 ​​사용하지 않도록 설정 했습니까?

확실하지 않은 경우 명령 줄 실행을 위해 다중 스레드로드가 비활성화 된 .fxcop 프로젝트 파일을 사용하는 것이 가장 좋습니다.

+0

둘 다 동일한 프로젝트 파일을 사용하고 있습니다. 내가있을 때 멀티 스레딩 옵션을 점검 할 것입니다. –

+0

나는 그것을 시험해 보았다. 그리고 불행하게도 그것을 고치지 않았다. 그러나 그것은 바른 방향에서 나를 이끌었다! –