Move common project reference to the S.T.E.W ref into a separate ItemGroup. (#32210)
authorAhson Khan <ahson_ahmedk@yahoo.com>
Fri, 14 Feb 2020 04:45:30 +0000 (20:45 -0800)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2020 04:45:30 +0000 (20:45 -0800)
* Move common project reference to the S.T.E.W ref into a separate
ItemGroup.

* Reword a bit.

* Slight tweak to wording so it is easier to read.

* End comment tag earlier.

src/libraries/System.Text.Json/ref/System.Text.Json.csproj

index 04b8e31..050a9cc 100644 (file)
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>
@@ -9,7 +9,6 @@
   <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
     <ProjectReference Include="..\..\System.Memory\ref\System.Memory.csproj" />
     <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
-    <ProjectReference Include="..\..\System.Text.Encodings.Web\ref\System.Text.Encodings.Web.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetsNetCoreApp)' != 'true'">
     <Reference Include="mscorlib" />
     <Reference Include="System.Memory" />
     <Reference Include="System.Threading.Tasks.Extensions" />
     <Reference Include="Microsoft.Bcl.AsyncInterfaces" />
+  </ItemGroup>
+  <!-- Since S.T.E.W continues to be built live within this repo (as both an in-box library and a standalone netstandard2.0 assembly),
+    we should use ProjectReference instead of Reference to make sure that its ref assembly gets built first before S.T.Json, regardless of the TFM. -->
+  <ItemGroup>
     <ProjectReference Include="..\..\System.Text.Encodings.Web\ref\System.Text.Encodings.Web.csproj" />
   </ItemGroup>
 </Project>
\ No newline at end of file