Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,23 @@
<MicrosoftNETCoreILAsmVersion>6.0.0-preview.5.21253.1</MicrosoftNETCoreILAsmVersion>
<!-- Libraries dependencies -->
<StyleCopAnalyzersVersion>1.2.0-beta.304</StyleCopAnalyzersVersion>
<SystemAppContextVersion>4.3.0</SystemAppContextVersion>
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
<SystemCollectionsVersion>4.3.0</SystemCollectionsVersion>
<SystemCollectionsConcurrentVersion>4.3.0</SystemCollectionsConcurrentVersion>
<SystemComponentModelAnnotationsVersion>5.0.0</SystemComponentModelAnnotationsVersion>
<SystemDataSqlClientVersion>4.8.1</SystemDataSqlClientVersion>
<SystemDiagnosticsContractsVersion>4.3.0</SystemDiagnosticsContractsVersion>
<SystemDiagnosticsDebugVersion>4.3.0</SystemDiagnosticsDebugVersion>
<SystemDiagnosticsToolsVersion>4.3.0</SystemDiagnosticsToolsVersion>
<SystemDiagnosticsTracingVersion>4.3.0</SystemDiagnosticsTracingVersion>
<SystemDynamicRuntimeVersion>4.3.0</SystemDynamicRuntimeVersion>
<SystemLinqExpressionsVersion>4.3.0</SystemLinqExpressionsVersion>
<SystemMemoryVersion>4.5.4</SystemMemoryVersion>
<SystemNetHttpVersion>4.3.4</SystemNetHttpVersion>
<SystemNetPrimitivesVersion>4.3.1</SystemNetPrimitivesVersion>
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
<SystemReflectionVersion>4.3.0</SystemReflectionVersion>
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<SystemResourcesResourceManagerVersion>4.3.0</SystemResourcesResourceManagerVersion>
<SystemRuntimeVersion>4.3.1</SystemRuntimeVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<TargetFrameworks>netstandard2.0;netstandard1.1;netstandard1.3;net45</TargetFrameworks>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<ExcludeFromPackage Condition="'$(TargetFramework)' == 'netstandard2.0'">true</ExcludeFromPackage>
<DefineConstants Condition="$(TargetFramework.StartsWith('net4'))">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS</DefineConstants>
<!-- Avoid referencing NETStandard.Library on netstandard1.x since this package is part of that closure -->
<DisableImplicitFrameworkReferences Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3'">true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.DiagnosticSource.cs" />
Expand All @@ -21,4 +22,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System.Runtime" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<Nullable>enable</Nullable>
<TargetFrameworks>$(NetCoreAppCurrent);net5.0;netstandard1.1;netstandard1.3;net45;net46;netstandard2.0</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>
Copy link
Member Author

@ericstj ericstj May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove this hack anyhow for when we eventually convert this project to CSProj packing.

I looked into completely removing https://github.com/dotnet/runtime/blob/main/eng/AvoidRestoreCycleOnSelfReference.targets but it's still used here:

<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>

And that can't be removed in the same way (we could refactor the project into a separate task project to fix it). I'm not doing that now since the current issue is blocking consumption of dotnet/runtime.

</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
Expand All @@ -21,6 +20,8 @@
<DefineConstants Condition="$(TargetFramework.StartsWith('net4'))">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS;ENABLE_HTTP_HANDLER</DefineConstants>
<ExcludeFromPackage Condition="'$(TargetFramework)' == 'netstandard2.0'">true</ExcludeFromPackage>
<DefineConstants Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">$(DefineConstants);W3C_DEFAULT_ID_FORMAT</DefineConstants>
<!-- Avoid referencing NETStandard.Library on netstandard1.x since this package is part of that closure -->
<DisableImplicitFrameworkReferences Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3'">true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Diagnostics\DiagnosticSource.cs" />
Expand Down Expand Up @@ -100,6 +101,22 @@
<Reference Include="System.Threading" />
<Reference Include="System.Resources.ResourceManager" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.Collections" Version="$(SystemCollectionsVersion)" />
<PackageReference Include="System.Collections.Concurrent" Version="$(SystemCollectionsConcurrentVersion)" />
<PackageReference Include="System.Diagnostics.Debug" Version="$(SystemDiagnosticsDebugVersion)" />
<PackageReference Include="System.Diagnostics.Tools" Version="$(SystemDiagnosticsToolsVersion)" />
<PackageReference Include="System.Diagnostics.Tracing" Version="$(SystemDiagnosticsTracingVersion)" />
<PackageReference Include="System.Reflection" Version="$(SystemReflectionVersion)" />
<PackageReference Include="System.Resources.ResourceManager" Version="$(SystemResourcesResourceManagerVersion)" />
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" />
<PackageReference Include="System.Runtime.InteropServices" Version="$(SystemRuntimeInteropServicesVersion)" />
<PackageReference Include="System.Threading" Version="$(SystemThreadingVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.AppContext" Version="$(SystemAppContextVersion)" />
<PackageReference Include="System.Runtime.Extensions" Version="$(SystemRuntimeExtensionsVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard1.1' and
$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETCoreApp'">
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
<DebugOptimization Condition="'$(Configuration)' == 'Release'">OPT</DebugOptimization>
<CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateVersionFile</CoreCompileDependsOn>
<DocumentationFile>$(MSBuildThisFileDirectory)System.Runtime.CompilerServices.Unsafe.xml</DocumentationFile>
<ExtraMacros Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)' or '$(TargetFramework)' == 'netcoreapp2.0'">#define netcoreapp</ExtraMacros>
<IlasmFlags>$(IlasmFlags) -DEBUG=$(DebugOptimization)</IlasmFlags>
</PropertyGroup>
<PropertyGroup>
<ExtraMacros Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)' or '$(TargetFramework)' == 'netcoreapp2.0'">#define netcoreapp</ExtraMacros>
<CoreAssembly>System.Runtime</CoreAssembly>
<CoreAssembly Condition="'$(TargetFramework)' == 'netstandard2.0'">netstandard</CoreAssembly>
<DisableImplicitFrameworkReferences Condition="'$(TargetFramework)' == 'netstandard1.0'">true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<CoreAssembly>mscorlib</CoreAssembly>
Expand All @@ -23,6 +26,9 @@
<!-- mscorlib is passed in as an explicit reference from C# targets but not via the IL SDK. -->
<Reference Include="$(CoreAssembly)"
Condition="!$(TargetFramework.StartsWith('netstandard'))" />

<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)"
Condition="'$(TargetFramework)' == 'netstandard1.0'" />
</ItemGroup>

<Target Name="GenerateVersionFile"
Expand Down