-
Notifications
You must be signed in to change notification settings - Fork 424
Runtime conflict resolution doesn't exclude System.Linq when RuntimeIdentifiers is set #184
Comments
Which CLI should I be using? |
I used a locally built one from dotnet/cli/master. But the latest from https://github.com/dotnet/cli/tree/master#installers-and-binaries should work. |
Bug is here: https://github.com/dotnet/core-setup/blob/master/pkg/tasks/GenerateFileVersionProps.cs#L87 The reason I did this was to address the case where we're building a shared framework app and don't have the runtime-specific packages in the view. I thought the only case that'd happen was when RIDs aren't set since that's how nuget3 targets worked, but it looks like the CLI is using the RID-less target for execution even for a standalone app. |
To workaround this you can edit <ItemGroup Condition="'$(RuntimeIdentifer)' == '' AND '$(RuntimeIdentifiers)' == ''">
<PackageConflictPlatformManifests Include="$(MSBuildThisFileDirectory)Microsoft.NETCore.App.PlatformManifest.txt" />
</ItemGroup> to
|
Extract the following
ConflictBug.zip
dotnet restore App
dotnet run -p App\ConflictBug.csproj
Expected result:
The app should run fine.
Actual result:
Looking at the .deps.json file, the "runtime" sections aren't getting removed for System.Linq, System.Linq.Parallel, etc even though these files are in the shared framework.
If I remove the line
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.10-x64;rhel.7-x64</RuntimeIdentifiers>
from the .csproj, the app executes fine./cc @ericstj
The text was updated successfully, but these errors were encountered: