title: How can I manipulate the Packageversion on a multi target project when manipulation comes from a NuGet package
body: <p>I have a NuGet package with a targets file which manipulates the PackageVersion depending on the current context (When the branch is master it's creates a preview).</p>
  <p>This is working well on a normal project but when I use this in a multi target project it's not working.</p>
  <p>How can I correct this?</p>
  <p>I have attached a sample project. <a href="https://1drv.ms/u/s!At1IZ7t_aXW-iNRchOhliGP8dunGHg?e=11dW4F" rel="nofollow noreferrer">https://1drv.ms/u/s!At1IZ7t_aXW-iNRchOhliGP8dunGHg?e=11dW4F</a>
  To reproduce the problem:</p>
  <ol>
  <li>Unzip all files</li>
  <li>You need a local NuGet Feed</li>
  <li>Entry the name of your local NuGet Feed in BuildConfig/publish.bat</li>
  <li>Call publish.bat in BuildConfig</li>
  <li>Run &quot;dotnet pack&quot; in Consumer</li>
  </ol>
  <p>This creates a package of consumer with version 1.0.0. This should bie 1.0.0-xdev.</p>
  <p>When you change Consumer.csproj so that TargetFramework is used the correct version is created</p>
  <p>I have tried the version modification outside of the target but this leads to problems when the version number is specified in a Directory.Build.Targets file</p>
  <p>I have tried different BeforeTargets in but nothing worked.</p>