2017-03-13 7 views
-2

以下のエラーログでMy Jenkinsジョブが失敗しています。提案してください。MSBuildがコード解析ツールを見つけられませんでした

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(289,5): error : MSBuild could not locate the Code Analysis tool at ''. If MSBuild is being run from within the "Visual Studio Command Prompt", specify the path to the Code Analysis tool by setting the FXCOPDIR environment variable. [C:\test.csproj] 
Done Building Project "C:\test.csproj" (Rebuild target(s)) -- FAILED. 

enter image description here

更新エラーログ

directory:"C:\OTA\AirSearch\BTS\src\packages\HttpWebAdapters.0.4.0.2002\lib\net35" /ruleSet:"=C:\OTA\AirSearch\BTS\.sonarqube\conf\\SonarQubeFxCop-cs.ruleset" /rule:"-C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules" /searchgac /ignoreinvalidtargets /forceoutput /successfile /ignoregeneratedcode /saveMessagesToReport:Active,Excluded /timeout:120 /reportMissingIndirectAssemblies 
    * Error(s) occurred during FxCop initialization: 
    * An exception was raised attempting to load engine 'c:\program files (x86)\microsoft visual studio 12.0\team tools\static analysis tools\fxcop\Engines\PhoenixAnalysisEngine.dll'. 

    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeAnalysis.Interop.dll' or one of its dependencies. The specified module could not be found. 
    at Microsoft.FxCop.Command.FxCopCommand.ProcessPlatformArgument(ArgumentDictionary argumentDictionary) 
    at Microsoft.FxCop.Command.FxCopCommand.Main2(String[] args) 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(289,5): error MSB6003: The specified task executable "FxCopCmd.exe" could not be run. Could not load file or assembly 'Microsoft.VisualStudio.CodeAnalysis.Sdk, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. [C:\test.csproj] 
    Code Analysis Complete -- 0 error(s), 0 warning(s) 
Done Building Project "C:\test.csproj" (default targets) -- FAILED. 
The target "MvcBuildViews" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets (843,131)" does not exist in the project, and will be ignored. 
Done Building Project "C:\test.sln" (default targets) -- FAILED. 
+0

どのコード解析ツールが失敗しましたか? SonarCube? – KimKulling

+0

私はそれについては分かりません。私はそのSonarQubeを感じる –

答えて

0

私はあなたのスクリーンショットで見ることができるものから、あなたのような(あなたのMSBuildの呼び出しで明示的にお気に入りのコード解析ツールへのパスを指定する必要がありますc。\ program files \ sonacube ...)、またはPATH環境変数へのパスをaddindで指定します(How to add path to PATH-env-var参照)

また、VS-FXCopのすべての依存関係を見つけて解決できるようにする必要があります。これを行う最善の方法は、ビジュアルスタジオvar batを呼び出すことです(私のインストールではVS2015の場合はC:¥Program Files(Microsoft)Visual Studio 14.0 \ VC \ bin \ vcvars32.batにあります)。あなたは正しいスクリプトを呼び出すことを確認してください。別のビジュアルスタジオからFxCopをコピーした場合は、このスクリプトを使用してください。再配布可能ファイルからインストールした場合は、すべての依存関係もコピーしてください。

+0

あなたはこれで私を助けてください –

+0

完全な生のログなしでハードです。何とかアップロードできれば便利です。 – KimKulling

+0

更新されたエラーログが追加されました –

関連する問題