<Project>
<!-- Only imported by NativeApplication: host BC/TLS tests retain the original NuGet bytes. -->
<Target Name="XfeNativeBouncyCastleEntropy" AfterTargets="CopyFilesToOutputDirectory"
Condition="'$(MSBuildProjectName)' == 'NativeApplication' and '$(XfeNativeEntropyPort)' == 'true'">
<Error Condition="!Exists('$(TargetDir)BouncyCastle.Cryptography.dll') or !Exists('$(TargetDir)XFESystem.NativeEntropy.dll')" Text="Native TLS requires BC and the explicit hardware entropy adapter in the private application output." />
<Exec Command="dotnet run --project "$(MSBuildThisFileDirectory)TlsEntropyPatch.csproj" -c Release --property:RestoreLockedMode=true --artifacts-path "$(IntermediateOutputPath)TlsEntropyToolArtifacts" -- "$(MSBuildThisFileDirectory)../.." "$(TargetDir)BouncyCastle.Cryptography.dll" "$(TargetDir)XFESystem.NativeEntropy.dll"" WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>
</Project>
<Project>
<!-- Only imported by NativeApplication: host BC/TLS tests retain the original NuGet bytes. -->
<Target Name="XfeNativeBouncyCastleEntropy" AfterTargets="CopyFilesToOutputDirectory"
Condition="'$(MSBuildProjectName)' == 'NativeApplication' and '$(XfeNativeEntropyPort)' == 'true'">
<Error Condition="!Exists('$(TargetDir)BouncyCastle.Cryptography.dll') or !Exists('$(TargetDir)XFESystem.NativeEntropy.dll')" Text="Native TLS requires BC and the explicit hardware entropy adapter in the private application output." />
<Exec Command="dotnet run --project "$(MSBuildThisFileDirectory)TlsEntropyPatch.csproj" -c Release --property:RestoreLockedMode=true --artifacts-path "$(IntermediateOutputPath)TlsEntropyToolArtifacts" -- "$(MSBuildThisFileDirectory)../.." "$(TargetDir)BouncyCastle.Cryptography.dll" "$(TargetDir)XFESystem.NativeEntropy.dll"" WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>
</Project>