Bring back hooks to AddRuntimeProjectReference from buildtools (dotnet/corefx#34979)
authorSantiago Fernandez Madero <safern@microsoft.com>
Thu, 31 Jan 2019 14:28:37 +0000 (06:28 -0800)
committerEric StJohn <ericstj@microsoft.com>
Thu, 31 Jan 2019 14:28:37 +0000 (06:28 -0800)
Commit migrated from https://github.com/dotnet/corefx/commit/38b2d1d4e298a717d99adadcfb0803a8e2a0b04f

eng/referenceFromRuntime.targets
eng/references.targets

index 5a87f36..2df3af1 100644 (file)
@@ -9,9 +9,23 @@
       <ReferenceCopyLocalPaths Condition="'%(ReferenceFromRuntime.Private)' == 'true'" Include="@(ReferenceFromRuntime->'$(RuntimePath)%(Identity).dll')" />
     </ItemGroup>
   </Target>
+  
+  <PropertyGroup>
+    <PrepareProjectReferencesDependsOn>
+      AddRuntimeProjectReference;
+      $(PrepareProjectReferencesDependsOn);
+    </PrepareProjectReferencesDependsOn>
+    <ResolveReferencesDependsOn>
+      AddRuntimeProjectReference;
+      $(ResolveReferencesDependsOn);
+    </ResolveReferencesDependsOn>
+    <CleanDependsOn>
+      AddRuntimeProjectReference;
+      $(CleanDependsOn)
+    </CleanDependsOn>
+  </PropertyGroup>
 
   <Target Name="AddRuntimeProjectReference"
-          BeforeTargets="AddReferencesDynamically"
           Condition="'$(IsTestProject)'!='true' AND '@(ReferenceFromRuntime)' != ''">
     <Error Condition="('$(IsReferenceAssembly)' != 'true' OR '$(AllowReferenceFromRuntime)' == 'true') AND '$(RuntimeProjectFile)' == ''" Text="RuntimeProjectFile must be specified when using ReferenceFromRuntime from source projects." />
     <Error Condition="'$(IsReferenceAssembly)' == 'true' AND '$(AllowReferenceFromRuntime)' != 'true'" Text="ReferenceFromRuntime may not be used from reference assemblies." />
index 7c9f43f..de6eccf 100644 (file)
@@ -34,5 +34,6 @@
       </Reference>
     </ItemGroup>
   </Target>
+
   <Target Name="AddReferencesDynamically" BeforeTargets="BeforeResolveReferences;ResolveAssemblyReferences" />
 </Project>
\ No newline at end of file