title: Nuget Conflicting projectreference and packagereference
body: <p>I'm running a ASP.NET Core app on the .NET 4.6.1 framework. I have 1 solution with multiple projects in it. All of the projects are class libraries that reference each other via PackageReferences in their .csproj (this way we can build, package and version them independently). However, I want to be able to test their integration with one another without needing to push them up to NuGet first - aka I want to use them as ProjectReferences in the solution, but PackageReferences when building them through my Jenkins build process in order to version the components separately.</p>
  
  <p>When .NET Core was project.json based, this worked fine.  I would set the version at the top of the project.json and if a project existed with that version in the solution it would reference it as a project, otherwise it would look for it on my NuGet feed.</p>
  
  <p>The problem with using ProjectReferences is that all project's would get the same version when they are built and sent to NuGet.</p>
  
  <p>Is there any way to do this in csproj? Look for a project reference if it exists, otherwise look at NuGet?</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;VersionPrefix&gt;1.3.0&lt;/VersionPrefix&gt;
      &lt;TargetFramework&gt;net461&lt;/TargetFramework&gt;
      &lt;TreatWarningsAsErrors&gt;true&lt;/TreatWarningsAsErrors&gt;
      &lt;AssemblyName&gt;MyProject1&lt;/AssemblyName&gt;
      &lt;PackageId&gt;MyProject1&lt;/PackageId&gt;
      &lt;NetStandardImplicitPackageVersion&gt;1.6.1&lt;/NetStandardImplicitPackageVersion&gt;
      &lt;GenerateAssemblyConfigurationAttribute&gt;false&lt;/GenerateAssemblyConfigurationAttribute&gt;
      &lt;GenerateAssemblyCompanyAttribute&gt;false&lt;/GenerateAssemblyCompanyAttribute&gt;
      &lt;GenerateAssemblyProductAttribute&gt;false&lt;/GenerateAssemblyProductAttribute&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="MyProject2" Version="1.4.0-*" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Http" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.1" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup Condition=" '$(TargetFramework)' == 'net461' "&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="Microsoft.CSharp" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>Above is an example, I would like MyProject2 to be referenced by ProjectReference if 1.4.0 exists in the solution.</p>