Reference Microsoft.NETCore.Targets
authorEric St. John <ericstj@microsoft.com>
Tue, 23 Jan 2018 23:43:15 +0000 (15:43 -0800)
committerEric St. John <ericstj@microsoft.com>
Mon, 29 Jan 2018 22:51:44 +0000 (14:51 -0800)
We want to make sure that Microsoft.NETCore.App has a reference to Microsoft.NETCore.Targets
so that the latest version is used and none of the old pre-2.0 runtime-specific packages get
brought into the package graph.

We were trying to do this before but it was failing because we weren't directly referencing the package.

In the future we could change this target to use the SDK assets file raising task then read the version
that was actually restored instead of forcing us to keep a direct reference to it.

Commit migrated from https://github.com/dotnet/core-setup/commit/389727cb4feb5274aeeb8e9c25c9ba346d1429b3

src/installer/pkg/projects/Microsoft.NETCore.App/src/Microsoft.NETCore.App.depproj

index e979c08..e11a70e 100644 (file)
@@ -34,6 +34,9 @@
     <PackageReference Include="Microsoft.NETCore.Platforms">
       <Version>$(MicrosoftNETCorePlatformsPackageVersion)</Version>
     </PackageReference>
+    <PackageReference Include="Microsoft.NETCore.Targets">
+      <Version>2.0.0</Version>
+    </PackageReference>
     <PackageReference Include="NETStandard.Library">
       <Version>$(NETStandardLibraryPackageVersion)</Version>
     </PackageReference>