Fix restore of netcoreapp when not downloading any packages
authorEric StJohn <ericstj@microsoft.com>
Fri, 6 Dec 2019 21:19:36 +0000 (13:19 -0800)
committerEric StJohn <ericstj@microsoft.com>
Fri, 6 Dec 2019 21:20:27 +0000 (13:20 -0800)
eng/depProj.targets
src/libraries/restore/netcoreapp/netcoreapp.depproj

index 2a2dd59..9136037 100644 (file)
@@ -68,7 +68,7 @@ See the LICENSE file in the project root for more information.
           BeforeTargets="ResolvePackageAssets"
           Condition="'$(VSDesignTimeBuild)' != 'true'" />
 
-  <Target Name="CoreCompile" Condition="'@(PackageReference)' != '' Or '@(PackageDownload)' == ''">
+  <Target Name="CoreCompile">
 
     <Error Condition="'$(NuGetDeploySourceItem)' != 'ReferenceCopyLocalPaths' and
                       '$(NuGetDeploySourceItem)' != 'Reference' and
@@ -98,8 +98,12 @@ See the LICENSE file in the project root for more information.
       </ContentWithTargetPath>
     </ItemGroup>
 
-    <Error Condition="'@(NuGetDeploy)' == ''" Text="Error no assets were resolved from NuGet packages." />
-    <Message Importance="High" Text="%(FullPath) (%(NuGetPackageId).%(NuGetPackageVersion)) -&gt; @(NuGetDeploy->'$(TargetDir)%(SubFolder)%(FileName)%(Extension)')" />
+    <Message Importance="High"
+             Condition="'@(NuGetDeploy)' == ''"
+             Text="$(MSBuildProjectFile): No assets were resolved from NuGet packages." />
+    <Message Importance="High"
+             Condition="'@(NuGetDeploy)' != ''"
+             Text="%(FullPath) (%(NuGetPackageId).%(NuGetPackageVersion)) -&gt; @(NuGetDeploy->'$(TargetDir)%(SubFolder)%(FileName)%(Extension)')" />
 
     <!-- Include marker files if an extension has been provided -->
     <!-- internal builds use this to distinguish files which have already been signed -->
index b7c2e8a..af7d025 100644 (file)
     <PackageReference Update="Microsoft.NETCore.App" IsImplicitlyDefined="false" PrivateAssets="None" />
   </ItemGroup>
 
-  <!-- Mark framework references from previous netcoreapp tfms >= 3.0 as copy-local. -->
-  <Target Name="_FrameworkReferencesToPrivate"
-          Condition="'$(TargetsNetCoreApp)' == 'true' and !$(TargetFramework.StartsWith('netcoreapp2.')) and '$(TargetFramework)' != '$(NetCoreAppCurrent)'"
-          AfterTargets="_HandlePackageFileConflicts">
-    <ItemGroup>
-      <_referencePrivate Include="@(Reference)" Private="true" />
-      <Reference Remove="@(Reference)" />
-      <Reference Include="@(_referencePrivate)" />
-    </ItemGroup>
-  </Target>
-
   <ItemGroup>
     <!-- for all configurations this project provides refs for that configuration -->
     <BinPlaceConfiguration Include="$(Configuration)" RefPath="$(RefPath)" />