2013-05-14 16 views
9

私たちのbuildagentでのみFXCOPにトラブルがあり、コマンドラインツールでのみ発生します。FX COP型の参照を解決できませんでした:System.Windows.Input.ICommand

私はCaliburn.Mircoフレームワークを使用しており、削除ボタンを使用できるようにカスタムトリガを追加しました。このクラスはICommandインターフェイスを実装します

エラー: "モジュール 'MyProject.UI'を読み取っているときに次のエラーが発生しました:型参照を解決できませんでした:[System、Version = 4.0.0.0、Culture = neutral、PublicKeyToken = b77a5c561934e089] System.Windows.Input.ICommand」

完全なエラーログ

<?xml version="1.0" encoding="utf-8"?> 
<?xml-stylesheet type="text/xsl" href="C:\BuildAgent\work\program files\microsoft fxcop 1.36\Xml\FxCopReport.xsl"?> 
<FxCopReport Version="10.0"> 
<Localized> 
    <String Key="Category">Category</String> 
    <String Key="Certainty">Certainty</String> 
    <String Key="CollapseAll">Collapse All</String> 
    <String Key="CheckId">Check Id</String> 
    <String Key="Error">Error</String> 
    <String Key="Errors">error(s)</String> 
    <String Key="ExpandAll">Expand All</String> 
    <String Key="Help">Help</String> 
    <String Key="Line">Line</String> 
    <String Key="Messages">message(s)</String> 
    <String Key="LocationNotStoredInPdb">[Location not stored in Pdb]</String> 
    <String Key="Project">Project</String> 
    <String Key="Resolution">Resolution</String> 
    <String Key="Rule">Rule</String> 
    <String Key="RuleFile">Rule File</String> 
    <String Key="RuleDescription">Rule Description</String> 
    <String Key="Source">Source</String> 
    <String Key="Status">Status</String> 
    <String Key="Target">Target</String> 
    <String Key="Warning">Warning</String> 
    <String Key="Warnings">warning(s)</String> 
    <String Key="ReportTitle">Code Analysis Report</String> 
</Localized> 
<Exceptions> 
    <Exception Keyword="CA0001" Kind="Engine"> 
    <Type>Microsoft.FxCop.Sdk.FxCopException</Type> 
    <ExceptionMessage>An unhandled exception was encountered during LoadTargetsForAnalysis:</ExceptionMessage> 
    <InnerType>Microsoft.FxCop.Sdk.InvalidMetadataException</InnerType> 
    <InnerExceptionMessage>The following error was encountered while reading module 'MyProject.UI': Could not resolve type reference: [System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]System.Windows.Input.ICommand.</InnerExceptionMessage> 
    <InnerStackTrace> at Microsoft.FxCop.Sdk.Reader.HandleError(ModuleNode mod, String errorMessage) 
    at Microsoft.FxCop.Sdk.Reader.GetDummyTypeNode(Identifier namesp, Identifier name, ModuleNode declaringModule, TypeNode declaringType, Boolean expectStruct) 
    at Microsoft.FxCop.Sdk.Reader.GetTypeFromRef(Int32 i, Boolean expectStruct) 
    at Microsoft.FxCop.Sdk.Reader.DecodeAndGetTypeDefOrRefOrSpec(Int32 codedIndex) 
    at Microsoft.FxCop.Sdk.Reader.GetInterfaces(Int32 i, Int32 firstInterfaceIndex, InterfaceCollection interfaces) 
    at Microsoft.FxCop.Sdk.Reader.GetTypeFromDefHelper(Int32 i) 
    at Microsoft.FxCop.Sdk.Reader.GetTypeFromDef(Int32 i) 
    at Microsoft.FxCop.Sdk.Reader.GetTypeList(ModuleNode module) 
    at Microsoft.FxCop.Sdk.ModuleNode.get_Types() 
    at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.LoadTargetsForAnalysis(TargetFileDictionary targetFiles, Int32 loadThreadCount) 
    at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.AnalyzeInternal()</InnerStackTrace> 
    </Exception> 
    <Exception Keyword="CA0001" Kind="Engine"> 
    <Type>Microsoft.FxCop.Sdk.FxCopException</Type> 
    <ExceptionMessage>An unhandled exception was encountered during GlobalBeforeAnalysis:</ExceptionMessage> 
    <InnerType>System.NullReferenceException</InnerType> 
    <InnerExceptionMessage>Object reference not set to an instance of an object.</InnerExceptionMessage> 
    <InnerStackTrace> at Microsoft.FxCop.Sdk.InternalUtilities.GlobalBeforeAnalysis() 
    at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.AnalyzeInternal()</InnerStackTrace> 
    </Exception> 
</Exceptions> 
</FxCopReport> 

答えて

1

は、オプションとして/gacを渡してみましたがありますか? /directoryもあり、FxCopにそのフォルダから必要なアセンブリを読み込むよう指示します。

さらに多くのオプションがありますavailable

関連する問題