1+ <Project >
2+ <Target Name =" FetchSatori" AfterTargets =" ResolveRuntimePackAssets" >
3+ <DownloadFile
4+ SourceUrl =" https://github.com/hez2010/Satori/releases/latest/download/windows_$(Platform).zip"
5+ DestinationFolder =" $(IntermediateOutputPath)$([System.Guid]::NewGuid().ToString('N'))"
6+ Retries =" 3" >
7+ <Output TaskParameter =" DownloadedFile" ItemName =" SatoriArchive" />
8+ </DownloadFile >
9+ </Target >
10+
11+ <Target Name =" ExtractSatori" AfterTargets =" FetchSatori" DependsOnTargets =" FetchSatori" >
12+ <Unzip
13+ SourceFiles =" @(SatoriArchive)"
14+ DestinationFolder =" $(IntermediateOutputPath)Satori"
15+ OverwriteReadOnlyFiles =" true"
16+ />
17+ </Target >
18+
19+ <Target Name =" IncludeSatoriInRuntimePackAssets" AfterTargets =" ExtractSatori" DependsOnTargets =" ExtractSatori" >
20+ <ItemGroup >
21+ <RuntimePackAsset Remove =" @(RuntimePackAsset)"
22+ Condition =" '%(RuntimePackAsset.Filename)' == 'coreclr'
23+ Or '%(RuntimePackAsset.Filename)' == 'clrjit'
24+ Or '%(RuntimePackAsset.Filename)' == 'System.Private.CoreLib' " />
25+
26+ <SatoriRuntimePackAsset Include =" $(IntermediateOutputPath)Satori\System.Private.CoreLib.dll" >
27+ <AssetType >runtime</AssetType >
28+ </SatoriRuntimePackAsset >
29+ <SatoriRuntimePackAsset Include =" $(IntermediateOutputPath)Satori\clrjit.dll;$(IntermediateOutputPath)Satori\coreclr.dll" >
30+ <AssetType >native</AssetType >
31+ <DropFromSingleFile >true</DropFromSingleFile >
32+ </SatoriRuntimePackAsset >
33+ <RuntimePackAsset Include =" @(SatoriRuntimePackAsset)" >
34+ <DestinationSubPath >%(Filename)%(Extension)</DestinationSubPath >
35+ <RuntimeIdentifier >$(RuntimeIdentifier)</RuntimeIdentifier >
36+ <CopyLocal >true</CopyLocal >
37+ <NuGetPackageId >Microsoft.NETCore.App.Runtime.win-x64</NuGetPackageId >
38+ <FileVersion >42.42.42.42424</FileVersion >
39+ <NuGetPackageVersion >42.42.42.42424</NuGetPackageVersion >
40+ </RuntimePackAsset >
41+ </ItemGroup >
42+ </Target >
43+ </Project >
0 commit comments