title: Why does TeamCity generate both a Visual Studio (.sln) build-step and several .NET CLI (dotnet) build steps?
body: <p>I'm trying to set up my solution to build using TeamCity 2019. When I enter the URL of my project's Git repository, TeamCity auto-detects 4 build steps:</p>
  
  <ol>
  <li>Visual Studio (sln) Targets: rebuild  </li>
  <li>.NET CLI (dotnet) restore </li>
  <li>.NET CLI (dotnet) build  </li>
  <li>.NET CLI (dotnet) test</li>
  </ol>
  
  <p>I'm confused about step 2/3. Why is .NET CLI restoring and building, when a re-build is already performed? Does this imply that something is unusual with my .sln file? </p>
  
  <p>This solution is a group of Windows desktop C++ projects, if that matters.</p>
  
  <p>The reason I'm so concerned with <em>why</em> these build steps are appearing is that the .NET CLI build step is failing with a mysterious error, discussed on both the TeamCity forum and StackOverflow:<br>
  <a href="https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360007640660-error-MSB4019-The-imported-project-C-Microsoft-Cpp-Default-props-was-not-found-when-building-via-TeamCity" rel="nofollow noreferrer">https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360007640660-error-MSB4019-The-imported-project-C-Microsoft-Cpp-Default-props-was-not-found-when-building-via-TeamCity</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15419610/msbuild-in-teamcity-of-visual-studio-2012-solution">MSBuild in TeamCity of Visual Studio 2012 solution</a></p>
  
  <p>I haven't been able to find any good answer for why those build-steps are failing. All of the answers on StackOverflow for that issue are pretty shot-in-the-dark "try this, try that" without a simple explanation of where I went wrong. </p>