title: MSBuild nuget package: what to add to .csproj file?
body: <p>I'm compiling and running a C# project through the terminal, using MSBuild, and it's working fine.</p>
  
  <p>Now, I need to add some nuget packages to my project (namely, SQLite).</p>
  
  <p>This is what I added to <code>myproj.csproj</code>:</p>
  
  <pre><code>&lt;!-- NuGet Packages --&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="EntityFramework" Version="6.0.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.Core" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.EF6" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.Linq" Version="1.0.108.0" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>However, when I run <code>msbuild myproj.csproj</code> I get the error <code>The type or namespace SQLite does not exist...</code>.</p>
  
  <p>Do I need to add anything else?</p>
  
  <p>Here's the full file:</p>
  
  <pre><code>&lt;Project DefaultTargets = "All" 
    xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  
    &lt;!-- Server --&gt;
    &lt;PropertyGroup&gt;
      &lt;ServerAssemblyName&gt;server.exe&lt;/ServerAssemblyName&gt;
      &lt;ServerSrcPath&gt;src/server/&lt;/ServerSrcPath&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;!-- Client --&gt;
    &lt;PropertyGroup&gt;
      &lt;ClientAssemblyName&gt;client.exe&lt;/ClientAssemblyName&gt;
      &lt;ClientSrcPath&gt;src/client/&lt;/ClientSrcPath&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;!-- Common --&gt;
    &lt;PropertyGroup&gt;
      &lt;CommonAssemblyName&gt;common.dll&lt;/CommonAssemblyName&gt;
      &lt;CommonSrcPath&gt;src/common/&lt;/CommonSrcPath&gt;
      &lt;OutputPath&gt;bin/&lt;/OutputPath&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;!-- Server --&gt;
    &lt;ItemGroup&gt;
      &lt;ServerCompile Include="$(ServerSrcPath)Server.cs" /&gt;
      &lt;ServerCompile Include="$(ServerSrcPath)Diginote.cs" /&gt;
      &lt;ServerCompile Include="$(ServerSrcPath)DB.cs" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;!-- Client --&gt;
    &lt;ItemGroup&gt;
      &lt;ClientCompile Include="$(ClientSrcPath)Client.cs" /&gt;
      &lt;ClientCompile Include="$(ClientSrcPath)cli/CLI.cs" /&gt;
      &lt;ClientCompile Include="$(ClientSrcPath)cli/Menu.cs" /&gt;
      &lt;ClientCompile Include="$(ClientSrcPath)cli/MainMenu.cs" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;!-- Common --&gt;
    &lt;ItemGroup&gt;
      &lt;CommonCompile Include="$(CommonSrcPath)Common.cs" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;!-- NuGet Packages --&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="EntityFramework" Version="6.0.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.Core" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.EF6" Version="1.0.108.0" /&gt;
      &lt;PackageReference Include="System.Data.SQLite.Linq" Version="1.0.108.0" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;!-- Server --&gt;
    &lt;Target Name="Server" DependsOnTargets="Common" Inputs="@(ServerCompile)" Outputs="$(OutputPath)$(ServerAssemblyName)"&gt;
      &lt;MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /&gt;
      &lt;Csc Sources="@(ServerCompile)" References="$(OutputPath)$(CommonAssemblyName)" OutputAssembly="$(OutputPath)$(ServerAssemblyName)"/&gt;
    &lt;/Target&gt;
  
    &lt;!-- Client --&gt;
    &lt;Target Name="Client" DependsOnTargets="Common" Inputs="@(ClientCompile)" Outputs="$(OutputPath)$(ClientAssemblyName)"&gt;
      &lt;MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /&gt;
      &lt;Csc Sources="@(ClientCompile)" References="$(OutputPath)$(CommonAssemblyName)" OutputAssembly="$(OutputPath)$(ClientAssemblyName)"/&gt;
    &lt;/Target&gt;
  
    &lt;!-- Common --&gt;
    &lt;Target Name="Common" Inputs="@(CommonCompile)" Outputs="$(OutputPath)$(CommonAssemblyName)"&gt;
      &lt;MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /&gt;
      &lt;Csc Sources="@(CommonCompile)" OutputAssembly="$(OutputPath)$(CommonAssemblyName)" TargetType="Library"/&gt;
    &lt;/Target&gt;
  
    &lt;Target Name="Clean"&gt;
      &lt;Delete Files="$(OutputPath)$(ServerAssemblyName)" /&gt;
      &lt;Delete Files="$(OutputPath)$(ClientAssemblyName)" /&gt;
      &lt;Delete Files="$(OutputPath)$(CommonAssemblyName)" /&gt;
    &lt;/Target&gt;
  
    &lt;Target Name="All" DependsOnTargets="Server;Client;Common" /&gt;
  
    &lt;Target Name="Rebuild" DependsOnTargets="Clean;All" /&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>