forked from TechEmpower/FrameworkBenchmarks
/
Benchmarks.csproj
70 lines (61 loc) · 3.21 KB
/
Benchmarks.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
<PublishTrimmed>true</PublishTrimmed>
<_TrimmerDefaultAction>link</_TrimmerDefaultAction>
</PropertyGroup>
<ItemGroup>
<None Update="wwwroot/**" CopyToOutputDirectory="PreserveNewest" />
<None Include="appsettings.json" CopyToOutputDirectory="PreserveNewest" />
<None Include="appsettings.postgresql.json" />
<None Include="appsettings.mysql.json" />
</ItemGroup>
<ItemGroup>
<TrimmerRootDescriptor Include="Linker.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-rc.1.20451.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1.20451.13" />
<PackageReference Include="Dapper" Version="2.0.90" />
<PackageReference Include="MySqlConnector" Version="1.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0-rc1" />
<PackageReference Include="System.IO.Pipelines" Version="5.0.0-rc.1.20451.14" />
</ItemGroup>
<!-- Redirect "dotnet publish" to "mono-rp" folder-->
<Target Name="TrickRuntimePackLocation" AfterTargets="ProcessFrameworkReferences">
<PropertyGroup>
<MonoRuntimeVer>5.0.0-rc.2.20474.8</MonoRuntimeVer>
</PropertyGroup>
<DownloadFile SourceUrl="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/flat2/microsoft.netcore.app.runtime.mono.llvm.aot.$(RuntimeIdentifier)/$(MonoRuntimeVer)/microsoft.netcore.app.runtime.mono.llvm.aot.$(RuntimeIdentifier).$(MonoRuntimeVer).nupkg" DestinationFolder="$(MSBuildThisFileDirectory)" DestinationFileName="mono-rp.zip">
</DownloadFile>
<Unzip SourceFiles="mono-rp.zip" DestinationFolder="mono-rp" />
<ItemGroup>
<RuntimePack>
<PackageDirectory>mono-rp</PackageDirectory>
</RuntimePack>
</ItemGroup>
<Message Text="New PackageDirectory: %(RuntimePack.PackageDirectory)" Importance="high" />
</Target>
<Target Name="AspNetCore" AfterTargets="ComputeResolvedFilesToPublishList">
<ItemGroup>
<AspNetCoreFiles Include="$(MSBuildBinPath)/../../shared/Microsoft.AspNetCore.App/**/*.dll" />
</ItemGroup>
<ItemGroup>
<ExtraFiles Include="%(RuntimePack.PackageDirectory)/runtimes/$(RuntimeIdentifier)/lib/$(TargetFramework)/*.dll" />
</ItemGroup>
<Copy SourceFiles="@(AspNetCoreFiles)" DestinationFolder="$(PublishDir)" />
<Copy SourceFiles="@(ExtraFiles)" DestinationFolder="$(PublishDir)" />
</Target>
<!-- TODO: remove once https://github.com/dotnet/runtime/pull/42729 is merged and nugets are updated -->
<Target Name="hack" AfterTargets="Publish">
<ItemGroup>
<HostingFiles Include="$(MSBuildBinPath)/../../host/fxr/**/libhostfxr.*" />
<PolicyFiles Include="$(MSBuildBinPath)/../../shared/Microsoft.NETCore.App/**/libhostpolicy.*" />
</ItemGroup>
<Copy SourceFiles="@(HostingFiles)" DestinationFolder="$(PublishDir)" />
<Copy SourceFiles="@(PolicyFiles)" DestinationFolder="$(PublishDir)" />
</Target>
</Project>