Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary ref source projects from Microsoft.Bcl packages #105312

Merged
merged 2 commits into from
Jul 23, 2024
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
12 changes: 2 additions & 10 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,10 @@
<Error Text="The passed-in TargetOS property value '$(TargetOS)' must be lowercase." />
</Target>

<ItemDefinitionGroup>
<TargetPathWithTargetPlatformMoniker>
<IsReferenceAssemblyProject>$(IsReferenceAssemblyProject)</IsReferenceAssemblyProject>
</TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup>

<Target Name="ValidateReferenceAssemblyProjectReferencesAndTargetFramework"
AfterTargets="ResolveReferences"
<Target Name="ValidateReferenceAssemblyProjectTargetFramework"
BeforeTargets="CoreCompile"
Condition="'$(IsReferenceAssemblyProject)' == 'true' and
'$(SkipValidateReferenceAssemblyProjectReferences)' != 'true'">
<Error Text="Reference assemblies must only reference other reference assemblies and '%(ReferencePath.ProjectReferenceOriginalItemSpec)' is not a reference assembly project and does not set 'ProduceReferenceAssembly'."
Condition="'%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' and '%(ReferencePath.IsReferenceAssemblyProject)' != 'true' and '%(ReferencePath.ReferenceAssembly)' == ''" />
<Error Text="Reference assemblies must be TargetPlatform agnostic. $(MSBuildProjectName) incorrectly targets $(TargetFramework), platform: $(TargetPlatformIdentifier)."
Condition="'$(TargetPlatformIdentifier)' != ''" />
</Target>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,37 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(NetFrameworkMinimum);netstandard2.1</TargetFrameworks>
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
<IsPackable>true</IsPackable>
<!-- This assembly should never be placed inbox as it is only for downlevel compatibility. -->
<PackageDescription>Provides the IAsyncEnumerable&lt;T&gt; and IAsyncDisposable interfaces and helper types for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.

Commonly Used Types:
System.IAsyncDisposable
System.Collections.Generic.IAsyncEnumerable
System.Collections.Generic.IAsyncEnumerator</PackageDescription>
<PackageDescription>Provides the IAsyncEnumerable&lt;T&gt; and IAsyncDisposable interfaces and helper types for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.</PackageDescription>
</PropertyGroup>

<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'netstandard2.1'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<Choose>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
<ItemGroup>
<Compile Include="Microsoft.Bcl.AsyncInterfaces.Forwards.cs" />
</ItemGroup>
</When>

<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs" />
<Compile Include="System\Runtime\CompilerServices\AsyncIteratorMethodBuilder.cs" />
<Compile Include="$(CoreLibSharedDir)\System\Collections\Generic\IAsyncEnumerable.cs">
<Link>System.Private.CoreLib\System\Collections\Generic\IAsyncEnumerable.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Collections\Generic\IAsyncEnumerator.cs">
<Link>System.Private.CoreLib\System\Collections\Generic\IAsyncEnumerator.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\IAsyncDisposable.cs">
<Link>System.Private.CoreLib\System\IAsyncDisposable.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs">
<Link>System.Private.CoreLib\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs">
<Link>System.Private.CoreLib\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs">
<Link>System.Private.CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs">
<Link>System.Private.CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs</Link>
</Compile>
<Compile Include="$(CoreLibSharedDir)\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs">
<Link>System.Private.CoreLib\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs</Link>
</Compile>
<Otherwise>
<ItemGroup>
<Compile Include="System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs" />
<Compile Include="System\Runtime\CompilerServices\AsyncIteratorMethodBuilder.cs" />

</ItemGroup>
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\IAsyncEnumerable.cs" Link="System.Private.CoreLib\System\Collections\Generic\IAsyncEnumerable.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\IAsyncEnumerator.cs" Link="System.Private.CoreLib\System\Collections\Generic\IAsyncEnumerator.cs" />
<Compile Include="$(CoreLibSharedDir)System\IAsyncDisposable.cs" Link="System.Private.CoreLib\System\IAsyncDisposable.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs" Link="System.Private.CoreLib\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs" Link="System.Private.CoreLib\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs" Link="System.Private.CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs" />
<Compile Include="$(CoreLibSharedDir)System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs" Link="System.Private.CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs" Link="System.Private.CoreLib\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs" />
</ItemGroup>

<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
</ItemGroup>
</Otherwise>
</Choose>

</Project>
Loading
Loading