title: .NET Core RuntimeIdentifier vs TargetFramework
body: <p>Can someone explain the purpose of this two in csproj file (VS2017):</p>
  
  <pre><code>&lt;TargetFramework&gt;netstandard1.6&lt;/TargetFramework&gt;
  &lt;RuntimeIdentifier&gt;win7&lt;/RuntimeIdentifier&gt;
  </code></pre>
  
  <p>I just migrated from VS2015 and now can't publish my web api because it looks I should use only one target framework. In addition I can't specify multiple RIDs. 
  All these changed things make me frustrated. Nothing works from scratch, should overcome something over and over. </p>
  
  <p>I just want developing my web-api on windows, run xUnit tests here and then deploy web-api to run on linux (ubuntu) server. 
  What I should put in both parameters in csproj ? 
  Links with good explanation is highly appreciated. </p>
  
  <p><strong>Update1</strong></p>
  
  <p>I have web api with referenced .net core libraries. Everything where migrated from VS2015. Now in root project I have 
  <code>&lt;TargetFrameworks&gt;netcoreapp1.1;net461&lt;/TargetFrameworks&gt;</code>. When I publish via VS2017 I got error: </p>
  
  <blockquote>
    <p>C:\Program
    Files\dotnet\sdk\1.0.3\Sdks\Microsoft.NET.Sdk\buildCrossTargeting\Microsoft.NET.Sdk.targets(31,5):
    error : The 'Publish' target is not supported without specifying a
    target framework. The current project targets multiple frameworks,
    please specify the framework for the published application.</p>
  </blockquote>
  
  <p>But I have specified target framework in publish as  <code>netcoreapp1.1</code>. 
  OK. Then I updated my csproj with <code>&lt;PropertyGroup Condition="$(TargetFramework)'=='netcoreapp1.1'"&gt;
      &lt;RuntimeIdentifier&gt;ubuntu.16.10-x64&lt;/RuntimeIdentifier&gt;
  &lt;/PropertyGroup&gt;</code> as suggested below. 
  But now I even can't build app, get error:</p>
  
  <blockquote>
    <p>5>C:\Program Files (x86)\Microsoft Visual
    Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5):
    error : Assets file '\obj\project.assets.json' doesn't
    have a target for '.NETCoreApp,Version=v1.1/ubuntu.16.10-x64'. Ensure
    you have restored this project for TargetFramework='netcoreapp1.1' and
    RuntimeIdentifier='ubuntu.16.10-x64'.</p>
  </blockquote>
  
  <p>I just want develop with VS2017 at windows 8.1/windows7 and deploy to ubuntu 16.10. 
  What I'm doing wrong ?</p>
  
  <p><strong>Update2</strong></p>
  
  <p>I have 8 projects in solution. 3 of them are xUnit tests. Thus we have 5 projects. 4 of these 5 are class libraries and 1 is my web-app.
  All 4 class libraries have this: </p>
  
  <pre><code>&lt;TargetFrameworks&gt;netstandard1.6;net461&lt;/TargetFrameworks&gt;    
  &lt;ItemGroup Condition=" '$(TargetFramework)' == 'net461' "&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="Microsoft.CSharp" /&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>My web app:</p>
  
  <pre><code>&lt;TargetFrameworks&gt;netcoreapp1.1;net461&lt;/TargetFrameworks&gt;
  &lt;ItemGroup Condition=" '$(TargetFramework)' == 'net461' "&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="Microsoft.CSharp" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>How to publish my web-app ?</p>