edit 3: It seems that what I'm trying to do is not supported; it's actually not possible to “share” project.json files through configurations. I am crowding out this question. How to point to a different project.json location in the .NET Core PCL?
edit 2: Yes, my suspicions were correct. ProjectJsonand ProjectLockJsonare not actually special MSBuild properties, their values were used in another imported MSBuild project to do the actual work. I will post more about this (hopefully in the form of an answer) when I have an update.
edit: I posted the whole project on GitHub so you guys can get a reproduction. Just a git clonerepository, open it in VS, start building, and you should click on the error.
Original publication
I am trying to create a portable class library based on .NET Core. I am having trouble linking multiple project.json files with my csproj. Here is my directory structure:
LibFoo
|
|
|
|
| |
|
|
|
I have two MSBuild platforms (with the exception of AnyCPU), Net45and Profile32. Basically, when it is installed in the .NET Framework 4.5, I want it to compile include.json in the root directory, and project.json in Platforms/Net45. When it is installed on Profile32, I want it to do this with project.json in Platforms/Profile32.
: MSBuild? csproj:
<ItemGroup Condition=" '$(Platform)' == 'Net45' ">
<TargetPlatform Include=".NETFramework, Version=4.5" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'Profile32' ">
<TargetPlatform Include="Windows, Version=8.1" />
<TargetPlatform Include="WindowsPhoneApp, Version=8.1" />
</ItemGroup>
<ItemGroup>
<None Include="Platforms\Net45\project.json" />
<None Include="Platforms\Profile32\project.json" />
</ItemGroup>
<PropertyGroup>
<ProjectJsonRoot>Platforms\$(Platform)</ProjectJsonRoot>
<ProjectJson>$(ProjectJsonRoot)\project.json</ProjectJson>
<ProjectLockJson>$(ProjectJsonRoot)\project.lock.json</ProjectLockJson>
</PropertyGroup>
<ItemGroup>
<None Include="project.json" />
</ItemGroup>
- ProjectJson ProjectLockJson . , , MSBuild, CoreFX, , csproj. - ?