Skip to content

Commit

Permalink
AOT: Move note about project files from Console page to NativeAOT page
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Dec 30, 2024
1 parent ef17a2d commit 24698bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/appendix/Appendix-A:-NativeAOT-on-PC.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FNA now has support for [NativeAOT](https://learn.microsoft.com/en-us/dotnet/cor

To get started, please read through the [official NativeAOT documentation](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/). Make sure to install the prerequisites listed for your OS.

To make a NativeAOT build, you should make .NET 8 project files for your game - instead of the usual FNA.csproj, you will reference FNA.Core.csproj. The code and content should largely be able to stay the same, with the exception of code that requires a JIT (i.e. you can't emit IL at runtime, as you might expect from ahead-of-time compilation).

To make your .csproj compatible with NativeAOT, add the following:
```
<PropertyGroup>
Expand Down
4 changes: 1 addition & 3 deletions docs/appendix/Appendix-B:-FNA-on-Consoles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ FNA supports deploying to Xbox and Nintendo Switch via NativeAOT. FNA does not h

## General Advice

For all console builds, you should make .NET 8 project files for your game - instead of the usual FNA.csproj, you will reference FNA.Core.csproj. The code and content should largely be able to stay the same, with the exception of code that requires a JIT (i.e. you can't emit IL at runtime, as you might expect from ahead-of-time compilation).

While the runtimes require a console NDA, there are some things you can do to make your game more robust that just-so-happens to make console support easier, without access to any particular SDK. If you're familiar with consoles, none of these will be surprising:

### NativeAOT

All platforms use NativeAOT as the runtime. If you want a solid head-start, you should read Appendix A. Don't underestimate this step, especially if your game heavily depends on .NET's reflection features!
All console builds use NativeAOT as the runtime. If you want a solid head-start, you should read Appendix A. Don't underestimate this step, especially if your game heavily depends on .NET's reflection features!

### Window Size Changes
Even if your window is not resizable, operating systems (including Windows!) may forcibly change the window size for a multitude of reasons, and so the graphics device will reset.
Expand Down

0 comments on commit 24698bd

Please sign in to comment.