title: What are the differences between Microsoft.NET.Sdk and Microsoft.NET.Sdk.Web
body: <p>I have a solution with two host projects (one is a <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/web-host?view=aspnetcore-2.1" rel="noreferrer">Web Host</a> and the other is a <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-2.1" rel="noreferrer">Generic Host</a>) and a class library project referenced by those two host projects.</p>
  
  <p>In the <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#sdk-attribute" rel="noreferrer">Sdk</a> attribute of the root tag <code>&lt;Project&gt;</code> of the *.csproj file, both host projects (web host and generic host) are using <code>Microsoft.NET.Sdk.Web</code>, but the class library project uses the <code>Microsoft.NET.Sdk</code>.</p>
  
  <p>The two host projects references the <code>Microsoft.AspNetCore.App</code> metapackage.</p>
  
  <p>The class library project are using <code>Microsoft.NETCore.App</code>, but it references some ASP.NET Core packages individually (packages of <code>Microsoft.AspNetCore.App</code> that are not in <code>Microsoft.NETCore.App</code>).</p>
  
  <p>About the correct SDK and metapackages:</p>
  
  <p>1) In the generic host project, should I use pure <strong>.NET Core</strong> (<code>Microsoft.NET.Sdk</code> and <code>Microsoft.NETCore.App</code>) instead of <strong>ASP.NET Core</strong> (<code>Microsoft.NET.Sdk.Web</code> and <code>Microsoft.AspNetCore.App</code>) since it is not a web project?</p>
  
  <p>2) In the class library project, is it fine to use <code>Microsoft.NET.Sdk</code> with <code>Microsoft.AspNetCore.App</code> to avoid the possibility to reference different versions of packages that belong to <code>Microsoft.AspNetCore.App</code> (to avoid for example, <code>Microsoft.AspNetCore.App@2.1.0</code> in the host project and <code>Microsoft.Extensions.Configuration@2.0.0</code> in the class library project)? Or I can only use <code>Microsoft.AspNetCore.App</code> metapackage with <code>Microsoft.NET.Sdk.Web</code> SDK?</p>
  
  <p>3) What difference does it make to use <code>Microsoft.NET.Sdk</code> or <code>Microsoft.NET.Sdk.Web</code>? The <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#sdk-attribute" rel="noreferrer">docs</a> says that <strong>"The SDK, as the layering document describes, is a set of MSBuild tasks and targets that can build .NET Core code."</strong>, but why do we need to have both of them? In practice, what <code>Microsoft.NET.Sdk.Web</code> does that <code>Microsoft.NET.Sdk</code> doesn't?</p>