title: Fortify build for .NET Core Projects
body: <p>I'm trying to run following powerShell script for scan my solution(.NET Core 2.0) with Fortify:</p>
  
  <pre><code>$SolutionFilePath = "C:\Repositories\MyProject"
  $SolutionFileName = "MyProjectToTest"
  $SSCFPRFileName = "MyProjectToTest.fpr"
  $BuildIdName = "MyProjectToTest"
  
  
  $path = "D:\Fortify"
  If(!(test-path $path))
  {
     New-Item -ItemType Directory -Force -Path $path
  }
  
  cd \
  cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
  
  sourceanalyzer -b $BuildIdName -clean
  sourceanalyzer -b $BuildIdName msbuild "$SolutionFilePath\$SolutionFileName.sln" 
  sourceanalyzer -b $BuildIdName -scan -f "$path\$SSCFPRFileName"
  
  exit 0
  </code></pre>
  
  <p>Every things works fine in my local machine.</p>
  
  <p>But when I tried to run it in the server as a build step in <a href="https://www.jetbrains.com/teamcity/" rel="nofollow noreferrer">TeamCity</a> (TeamCity Enterprise 2018.2.1 (build 61078)) I got an error:</p>
  
  <pre><code>Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  MSBUILD : error MSB1021: Cannot create an instance of the logger. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
  Switch: C:\Program Files\HPE_Security\Fortify_SCA_and_Apps_17.20\Core\lib\FortifyMSBuildTouchless.dll
  </code></pre>
  
  <p>I'm using same version of Fortify in my local and the server (Fortify Static Code Analyzer 17.20.0183 (using JRE 1.8.0_144)
  ). </p>
  
  <p>In both server and local machine I installed <a href="https://visualstudio.microsoft.com/downloads/#vstool-2019" rel="nofollow noreferrer">Build Tools for Visual Studio 2019</a> and .Net core SDK.</p>
  
  <p>I tried with different version of MsBuild(14, 15, 16) and <code>dotnet.exe</code> and <code>devenv.exe</code> and I installed PowerShell Core. I got the same error. </p>
  
  <p>I also could run the script in the same server for .NETFramework projects successfully, the only change is I used different path:</p>
  
  <pre><code>cd "C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
  </code></pre>
  
  <p>It seems Fortify 17.20 does not support the .NETCore 2.X, When I add the </p>
  
  <pre><code>-dotnet-core-version 2.0
  </code></pre>
  
  <p>I got an error (in both local and server): </p>
  
  <pre><code>[error]: Invalid parameter 2.0 for command line argument -dotnet-core-version
  </code></pre>
  
  <p>but with 1.X is OK, so how is possible the same version of fortify works fine in local but not in the server?</p>
  
  <p>What is the problem with .NETCore projects? any idea?</p>