|
1 | 1 | <Project> |
2 | | - <PropertyGroup> |
3 | | - <AndroidPackageFormat>apk</AndroidPackageFormat> |
4 | | - <AndroidUseDefaultAotProfile>false</AndroidUseDefaultAotProfile> |
5 | | - <MauiUseDefaultAotProfile>false</MauiUseDefaultAotProfile> |
6 | | - </PropertyGroup> |
7 | | - <ItemGroup> |
8 | | - <Compile Include="$(MSBuildThisFileDirectory)CommonMethods.cs" /> |
9 | | - <AndroidAotProfile Include="custom.aprof" /> |
10 | | - <PackageReference Include="Mono.AotProfiler.Android" Version="7.0.0-preview1" /> |
11 | | - </ItemGroup> |
12 | | - <PropertyGroup> |
13 | | - <RecordDependsOn> |
14 | | - Clean; |
15 | | - _ClearSystemProperties; |
16 | | - BuildAndStartAotProfiling; |
17 | | - _Sleep; |
18 | | - FinishAotProfiling; |
19 | | - _StripAppMethods; |
20 | | - _SaveMethodNames; |
21 | | - </RecordDependsOn> |
22 | | - </PropertyGroup> |
23 | | - <Target Name="Record" DependsOnTargets="$(RecordDependsOn)"> |
24 | | - <Message Importance="High" Text="Success! See changes in: $(MSBuildThisFileDirectory)dotnet.aotprofile" /> |
25 | | - </Target> |
26 | | - <Target Name="_ClearSystemProperties" DependsOnTargets="_ResolveMonoAndroidSdks"> |
27 | | - <!-- Clear debug.mono.log in case it was set --> |
28 | | - <Exec Command=""$(AdbToolPath)adb" shell "setprop debug.mono.log ''"" /> |
29 | | - </Target> |
30 | | - <Target Name="_Sleep"> |
31 | | - <Sleep Delay="5000" /> |
32 | | - </Target> |
33 | | - <UsingTask TaskName="Sleep" |
34 | | - TaskFactory="RoslynCodeTaskFactory" |
35 | | - AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll"> |
36 | | - <ParameterGroup> |
37 | | - <Delay ParameterType="System.Int32" Required="true" /> |
38 | | - </ParameterGroup> |
39 | | - <Task> |
40 | | - <Using Namespace="System.IO" /> |
41 | | - <Code Type="Fragment" Language="cs"> |
42 | | - <![CDATA[ |
43 | | - System.Threading.Thread.Sleep(this.Delay); |
44 | | - ]]> |
45 | | - </Code> |
46 | | - </Task> |
47 | | - </UsingTask> |
48 | | - <Target Name="_StripAppMethods"> |
49 | | - <!-- This removes HelloAndroid.dll from the profile, as user's apps will have a different name --> |
50 | | - <Exec Command=""$(DotNetPreviewTool)" "$(AotProfileToolPath)" -sd --filter-module="^(?!$(App)).+" "$(MSBuildProjectDirectory)/custom.aprof" -o "$(MSBuildThisFileDirectory)dotnet.aotprofile"" /> |
51 | | - </Target> |
52 | | - <Target Name="_SaveMethodNames"> |
53 | | - <!-- This saves all the method names to a text file, so we can see a diff over time --> |
54 | | - <Exec Command=""$(DotNetPreviewTool)" "$(AotProfileToolPath)" -m "$(MSBuildThisFileDirectory)dotnet.aotprofile" > "$(MSBuildThisFileDirectory)dotnet.aotprofile.txt"" /> |
55 | | - </Target> |
| 2 | + <Import Project="$(MSBuildThisFileDirectory)old.profiler.targets" /> |
| 3 | + <Import Project="$(MSBuildThisFileDirectory)new.profiler.targets" /> |
56 | 4 | </Project> |
0 commit comments