title: How do you specify common package versions in a common.props file?
body: <p>We've got a simple common.props file that is basically doing what Directory.Build.props appears to do. It specifies various settings and is then imported to the csproj files that need it.</p>
  <p>Here's the basics of the MyProject.common.props file:</p>
  <pre><code>&lt;Project&gt;
    &lt;PropertyGroup&gt;
      // some settings
    &lt;/PropertyGroup&gt;
  
    &lt;PropertyGroup&gt;
      &lt;LangVersion&gt;8.0&lt;/LangVersion&gt;
      
      //some more settings...
  
      &lt;MyNewVariable&gt;3.1.22&lt;/MyNewVariable&gt;
    &lt;/PropertyGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>Here's the basics of the csproj:</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;Import Project=&quot;..\..\folderA\MyProject.common.props&quot; /&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.Extensions.Hosting.WindowsServices&quot; Version=&quot;$(MyNewVariable)&quot; /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>When I use this approach I get the error:</p>
  <blockquote>
  <p>Project dependency Microsoft.Extensions.Hosting.WindowsServices does
  not contain an inclusive lower bound. Include a lower bound in the
  dependency version to ensure consistent restore results.</p>
  </blockquote>
  <p>However, if I just input 3.1.22 where the variable is it works fine. This suggests to me that the variable is coming through empty or not being picked up. If I remove the variable altogether and leave the Version blank I get the same error. I also double checked the path to the file by misspelling the import and I get a different error, so I know it can at least find the common.props file.</p>