Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] exclude Xamarin.Android.PCLSupport.targets (dotnet#5430)
We are currently importing/using `Xamarin.Android.PCLSupport.targets`, which does not appear to be needed at all in .NET 6. Even if I add a PCL such as PCLStorage: <PackageReference Include="PCLStorage" Version="1.0.2" /> The `ImplicitlyExpandDesignTimeFacades` target doesn't do any actual work: Task "GetDependsOnNETStandard" skipped, due to false condition; ('$(_HasReferenceToSystemRuntime)' != 'true' and '$(_IsXBuild)' != 'true' and '$(DependsOnNETStandard)' == '' and '@(_XACandidateNETStandardReferences->Count())' != '0') was evaluated as ('true' != 'true' and 'true' != 'true' and '' == '' and '156' != '0'). Task "Message" skipped, due to false condition; ('%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandDesignTimeFacades') was evaluated as ('{RawFileName}' == 'ImplicitlyExpandDesignTimeFacades'). The dotnet/sdk, seems to already know how to bring in `netstandard.dll`, and we don't need to do anything here. Let's exclude `Xamarin.Android.PCLSupport.targets` and `Xamarin.Android.PCLSupport.props` from the .NET 6 packages and stop importing them. This should save a small amount of time on every .NET 6 build: 4 ms ImplicitlyExpandDesignTimeFacades 3 calls This target was being called N+1 times per `$(RuntimeIdentifier)` and is completely removed now. This was a ~4ms savings on a "Hello World" .NET 6 application on macOS.
- Loading branch information