Skip to content

Commit 4ee6887

Browse files
authored
Merge pull request #982 from unoplatform/dev/jela/aot-doc
docs: adjust profile location for uno.sdk
2 parents b10093c + e70e165 commit 4ee6887

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

doc/runtime-execution-modes.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Finally, runtime statistics are maintained by the jiterpreter and can be display
4949

5050
This mode enables AOT compilation for most of the assemblies, with [some specific exceptions](https://github.com/dotnet/runtime/issues/50609).
5151

52-
By default, this mode is only enabled when running `dotnet publish`.
52+
This mode is only active when running `dotnet publish`, `dotnet build -r Release` or any other build mode will not activate it.
5353

5454
To enable AOT compilation on normal builds, use the following:
5555

@@ -90,21 +90,23 @@ To create a profiled build:
9090
- Launch App.saveProfile()
9191
- Download the `aot.profile` file next to the csproj file
9292
- Comment the `WasmShellGenerateAOTProfile` line
93-
- Add the following lines:
93+
- Add a reference to the generated file:
94+
- If you're using the [Uno.Sdk](xref:Uno.Features.Uno.Sdk), place the file in the `Platforms/WebAssembly` folder
95+
- If you're not using the Uno.Sdk, add the following lines:
9496

95-
```xml
96-
<ItemGroup>
97-
<WasmShellEnableAotProfile Include="aot.profile" />
98-
</ItemGroup>
99-
```
97+
```xml
98+
<ItemGroup>
99+
<WasmShellEnableAotProfile Include="aot.profile" />
100+
</ItemGroup>
101+
```
100102

101103
- Make sure that Mixed mode is enabled:
102104

103105
```xml
104106
<WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode>
105107
```
106108

107-
- Build your application again
109+
- Publish your application again, using `dotnet publish`. (`dotnet build` does not activate AOT)
108110

109111
Note that the AOT profile is a snapshot of the current set of assemblies and methods in your application. If that set changes significantly, you'll need to re-create the AOT profile to get optimal results.
110112

0 commit comments

Comments
 (0)