Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R2R | CsWinRT Component] Allow CsWinRT component to deploy .NET dlls as ready to run. #1523

Open
RobsonPontin opened this issue Mar 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@RobsonPontin
Copy link

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:

  1. Building the entire solution with msbuild.exe
  2. Manually building the CsWinRT component by using msbuild.exe + publish profiles in it,
  3. 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:

image

Open Questions

  1. Could this be possible by building the C++ App directly with msbuild?
  2. Could this be also available on VS?
  3. If this is possible what could be a timeline?
@RobsonPontin RobsonPontin added the enhancement New feature or request label Mar 5, 2024
@dongle-the-gadget
Copy link
Contributor

ReadyToRun doesn't support native DLLs AFAIK.

@hez2010
Copy link
Contributor

hez2010 commented Mar 6, 2024

I think it's already possible to use R2R together with CsWinRT for a C# WinRT component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants