In an architecture where we have a WinUI 3 C++ application and a CsWinRT component dependency, we would like to have a simple way to deploy it as ready to run to reduce JIT time and improve performance.
Rationale
Since Windows App SDK does not support Native AOT yet, and for any other reason, a native C++ application might be a good approach to reduce overhead of loading .NET runtime dlls during app launch.
With this, as far as I know, there is not a way to allow the C++ app to use publish profiles and therefore deploy it as ReadyToRun.
At the moment I achieved this by:
Building the entire solution with msbuild.exe
Manually building the CsWinRT component by using msbuild.exe + publish profiles in it,
Manually copying all dlls that got ReadyToRun (usually double of the size now) and replace it the ones from first build.
Important Notes
Here is a sample project for your reference of a similar architecture:
Hello.
Summary
In an architecture where we have a WinUI 3 C++ application and a CsWinRT component dependency, we would like to have a simple way to deploy it as ready to run to reduce JIT time and improve performance.
Rationale
Since Windows App SDK does not support Native AOT yet, and for any other reason, a native C++ application might be a good approach to reduce overhead of loading .NET runtime dlls during app launch.
With this, as far as I know, there is not a way to allow the C++ app to use publish profiles and therefore deploy it as ReadyToRun.
At the moment I achieved this by:
Important Notes
Here is a sample project for your reference of a similar architecture:
Open Questions