-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Milestone
Description
The implicit PackageTargetFallback in Microsoft.NET.Sdk.BeforeCommon.targets causes .NET Framework targets to be imported into .NET Core 2.0 projects.
Repro
Run dotnet restore on this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3.linux" Version="1.1.4" />
</ItemGroup>
</Project>
SQLitePCLRaw.lib.e_sqlite3.linux contains a file in build/net35/SQLitePCLRaw.lib.e_sqlite3.linux.targets
Expected
build/net35/SQLitePCLRaw.lib.e_sqlite3.linux.targets
should not be imported.
Actual
build/net35/SQLitePCLRaw.lib.e_sqlite3.linux.targets
is imported because PackageTargetFallback is set to include net461.
Implicit PackageTargetFallback was added in #1133