title: How to point to a different project.json location in a .NET Core PCL?
body: <p>Say you have a .NET Core PCL that's supposed to compile for multiple platforms. Since csproj-based projects only support compiling for one platform at a time, you can't have a shared <code>project.json</code>. Thus, your directory structure looks like this:</p>
  
  <pre><code>LibFoo
  |
  ---- LibFoo.csproj
  |
  ---- Platforms
       |
       ---- net45
       |    |
       |    ---- project.json
       |
       ---- netcore451
            |
            ---- project.json
  </code></pre>
  
  <p>You also have two MSBuild target platforms: <code>Net45</code> and <code>NetCore451</code>. When building for <code>Net45</code> you want to include the project file in <code>Platforms/net45</code>, and for <code>NetCore451</code> (which is Windows 8.1, by the way) you want to include the one in <code>netcore451</code>.</p>
  
  <p>How would you go about implementing this in MSBuild? Here is what I have so far:</p>
  
  <pre><code>&lt;PropertyGroup&gt;
    &lt;ProjectJsonRoot&gt;Platforms\$(Platform.ToLower())&lt;/ProjectJsonRoot&gt;
    &lt;ProjectJson&gt;$(ProjectJsonRoot)\project.json&lt;/ProjectJson&gt;
  &lt;/PropertyGroup&gt;
  
  &lt;!-- Now $(ProjectJson) is set to the project.json location,
       what do I do to 'register' it with the compiler? --&gt;
  </code></pre>
  
  <p><strong>TL;DR:</strong> How would you set the <code>project.json</code> to a different location from your csproj file, if it isn't in the same location as it?</p>
  
  <p>Thanks for helping.</p>