2011-09-16 7 views
7

は、ログを次があります: (FxCopのコンフィグで冗長スイッチ)ソナーC#のエコシステム:.NET C#ソリューションを構築する際にFxCopのエラーコード521

をそれは完璧に動作し、独自のfxcopcmd.exeコマンドを実行する場合。ソナー・ランナー・バットと一緒に使えないのはなぜですか?

15-Sep-2011 03:05:37 [DEBUG] Executing FxCop program... 
15-Sep-2011 03:05:37 [DEBUG] No assembly specified: will look into 'csproj' files to find which should be analyzed. 
15-Sep-2011 03:05:37 [DEBUG] - Found C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll 
15-Sep-2011 03:05:37 [DEBUG] Using C:\b\SH-SHN-JOB1\Source\SomeSystem.Client as base dir when searching FxCop reference directories 
15-Sep-2011 03:05:37 [DEBUG] - FxCop program   : C:\Program Files\Microsoft FxCop 10.0\FxCopCmd.exe 
15-Sep-2011 03:05:37 [DEBUG] - Project file   : C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\sonar.FxCop 
15-Sep-2011 03:05:37 [DEBUG] - Report file   : C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\fxcop-report.xml 
15-Sep-2011 03:05:37 [DEBUG] - Scanned assemblies : 
15-Sep-2011 03:05:37 [DEBUG]  o C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll 
15-Sep-2011 03:05:37 [DEBUG] - Assembly dependencies : 
15-Sep-2011 03:05:37 [DEBUG]  o [Silverlight] C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0 
15-Sep-2011 03:05:37 [DEBUG] - Ignoring generated code 
15-Sep-2011 03:05:37 [DEBUG] Executing command: C:\Program Files\Microsoft FxCop 10.0\FxCopCmd.exe /p:C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\sonar.FxCop /out:C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\fxcop-report.xml /f:C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll /d:C:\Program Files\Reference  Assemblies\Microsoft\Framework\Silverlight\v4.0 /igc /to:600 /gac 
15-Sep-2011 03:05:37 [INFO] Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86 
15-Sep-2011 03:05:37 [INFO] Copyright (C) Microsoft Corporation, All Rights Reserved. 
15-Sep-2011 03:05:37 [INFO] 
15-Sep-2011 03:05:37 [INFO] Loading C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\sonar.FxCop... 
15-Sep-2011 03:05:37 [INFO] Loaded DesignRules.dll... 
15-Sep-2011 03:05:37 [INFO] Loaded GlobalizationRules.dll... 
15-Sep-2011 03:05:37 [INFO] Loaded NamingRules.dll... 
15-Sep-2011 03:05:37 [INFO] Loaded PerformanceRules.dll... 
15-Sep-2011 03:05:37 [INFO] Loading C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll 
15-Sep-2011 03:05:37 [INFO] Using system files at: C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll. 
15-Sep-2011 03:05:37 [INFO] Resolver hooked up for: 'C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\mscorlib.dll'. 
15-Sep-2011 03:05:37 [INFO] Resolver hooked up for: 'C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll'. 
15-Sep-2011 03:05:37 [INFO] Unresolved : 'Company.SomeSystem.Client' reference to Microsoft.Practices.Prism, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. 
15-Sep-2011 03:05:37 [INFO] Could not resolve reference to Microsoft.Practices.Prism. 
15-Sep-2011 03:05:37 [INFO] The following error was encountered while reading module 'Company.SomeSystem.Client': Assembly reference cannot be resolved: Microsoft.Practices.Prism,  Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.HandleError(ModuleNode mod, String errorMessage) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetAssemblyFromReference(AssemblyReference assemblyReference) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.AssemblyReference.get_Assembly() 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetTypeFromRef(Int32 i, Boolean expectStruct) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetTypeIfNotGenericInstance(Int32 codedIndex) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.ConstructCorrectTypeNodeSubclass(Int32 i, Identifier namesp, Int32 firstInterfaceIndex, Int32 lastInterfaceIndex, TypeFlags flags, InterfaceCollection interfaces, Int32 baseTypeCodedIndex, Boolean isSystemEnum) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetTypeFromDefHelper(Int32 i) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetTypeFromDef(Int32 i) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.Reader.GetTypeList(ModuleNode module) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.ModuleNode.get_Types() 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.LanguageManager.GetFileName(ModuleNode module) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.LanguageManager.GetSourceLanguageFromSymbols(ModuleNode module) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Sdk.LanguageManager.GetSourceLanguage(ModuleNode module) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.DisplayFormatter.GetNameProvider(ModuleNode module) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.DisplayFormatter.GetDisplayName(Node node) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.LoadVisitor.FindTargetModule(ModuleNode module, TargetModuleDictionary targets) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.BaseVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.LoadVisitor.VisitAssembly(AssemblyNode assembly, TargetFile target) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.LoadVisitor.Load(TargetFile target, Boolean buildTree, Boolean queueItems, AssemblyNode loadedAssembly) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Engines.Introspection.IntrospectionAnalysisEngine.LoadTargets(TargetFile target) 
15-Sep-2011 03:05:37 [INFO]  at Microsoft.FxCop.Common.EngineManager.LoadTargets(TargetFile target, Boolean resetCounts, String loadEngine) 
15-Sep-2011 03:05:37 [INFO] Could not load C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll. 
15-Sep-2011 03:05:37 [INFO] No targets were selected. 
15-Sep-2011 03:05:37 [INFO] 
15-Sep-2011 03:05:37 [INFO] NOTE: One or more referenced assemblies could not be found. Use the '/directory' or '/reference' switch to specify additional assembly reference search paths. 
15-Sep-2011 03:05:37 [INFO] 
15-Sep-2011 03:05:37 [INFO] Could not load C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\Bin\Release\Company.SomeSystem.Client.dll. 
15-Sep-2011 03:05:37 [INFO] * Analysis was not performed; at least one valid rules assembly and one valid 
15-Sep-2011 03:05:37 [INFO] target file must be specified. 
15-Sep-2011 03:05:37 [INFO] * 2 total analysis engine exceptions. 
15-Sep-2011 03:05:37 [INFO] Writing report to C:\b\SH-SHN-JOB1\Source\SomeSystem.Client\.sonar\fxcop-report.xml... 
15-Sep-2011 03:05:37 [INFO] Done:00:00:00.6876672 
15-Sep-2011 03:05:38 [DEBUG] JDBC Driver [Proxy: [email protected]] deregistered 
15-Sep-2011 03:05:38 [DEBUG] To prevent a memory leak, the JDBC Driver [com.mysql.jdbc.Driver] has been forcibly deregistered 
15-Sep-2011 03:05:38 [DEBUG] Delete temporary directories 
15-Sep-2011 03:05:38 [DEBUG] Delete temporary directory: C:\Temp\sonar-batch48894413591140935345849622192274996 
15-Sep-2011 03:05:38 [DEBUG] Delete temporary directory: C:\Temp\sonar-batch67144837301840862745763165847723383 
15-Sep-2011 03:05:38 Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.api.utils.SonarException: FxCop execution failed. 
15-Sep-2011 03:05:38   at org.sonar.runner.Runner.delegateExecution(Runner.java:155) 
15-Sep-2011 03:05:38   at org.sonar.runner.Runner.execute(Runner.java:58) 
15-Sep-2011 03:05:38   at org.sonar.runner.Main.main(Main.java:52) 
15-Sep-2011 03:05:38 Caused by: org.sonar.api.utils.SonarException: FxCop execution failed. 
15-Sep-2011 03:05:38   at org.sonar.plugins.csharp.fxcop.FxCopSensor.analyse(FxCopSensor.java:113) 
15-Sep-2011 03:05:38   at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) 
15-Sep-2011 03:05:38   at org.sonar.batch.phases.Phases.execute(Phases.java:93) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.Module.start(Module.java:89) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:105) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.Module.start(Module.java:89) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) 
15-Sep-2011 03:05:38   at org.sonar.batch.bootstrap.Module.start(Module.java:89) 
15-Sep-2011 03:05:38   at org.sonar.batch.Batch.execute(Batch.java:74) 
15-Sep-2011 03:05:38   at org.sonar.runner.Launcher.executeBatch(Launcher.java:60) 
15-Sep-2011 03:05:38   at org.sonar.runner.Launcher.execute(Launcher.java:53) 
15-Sep-2011 03:05:38   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
15-Sep-2011 03:05:38   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
15-Sep-2011 03:05:38   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
15-Sep-2011 03:05:38   at java.lang.reflect.Method.invoke(Unknown Source) 
15-Sep-2011 03:05:38   at org.sonar.runner.Runner.delegateExecution(Runner.java:152) 
15-Sep-2011 03:05:38   ... 2 more 
15-Sep-2011 03:05:38 Caused by: org.sonar.dotnet.tools.fxcop.FxCopException: FxCop execution failed with return code '521'. Check FxCop documentation for more information. 
15-Sep-2011 03:05:38   at org.sonar.dotnet.tools.fxcop.FxCopRunner.execute(FxCopRunner.java:100) 
15-Sep-2011 03:05:38   at org.sonar.plugins.csharp.fxcop.FxCopSensor.launchFxCop(FxCopSensor.java:151) 
15-Sep-2011 03:05:38   at org.sonar.plugins.csharp.fxcop.FxCopSensor.analyse(FxCopSensor.java:111) 
15-Sep-2011 03:05:38   ... 20 more 

答えて

1

は公式のwiki(*)で説明したように、「sonar.fxcop.assemblyDependencyDirectories」キーを使用してプリズムアセンブリの場所を指定しようとしたことがありますか?とにかく

あなたがそのようなあなたのSLNファイルとの完全な出力としてユーザーメーリングリスト(**)で助けを求めると、情報を送信する必要があります「MVNソナー:ソナー-X」

* http://docs.codehaus.org/display/SONAR/sonar-csharp-fxcop-plugin

** http://www.sonarsource.org/support/support/

+0

sonar.fxcop.assemblyDependencyDirectories = $(SolutionDir)/... Lib/**/*。dllは私のためには機能しません - 絶対パスであっても常にリソースが見つかりません。私たちの開発者は、lib依存関係のためにCopyLocal = trueを設定して、それらがOutDirにあることを保証します。 – mawl

+0

実際、ワイルドカードパターンはバージョン1.0ではサポートされていません。私はすぐにバージョン1.1をリリースします、10月の最初の週、私は願っています。 –

関連する問題