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

System.NotSupportedException when PublishAot is set to true #1623

Open
hez2010 opened this issue May 19, 2024 · 3 comments
Open

System.NotSupportedException when PublishAot is set to true #1623

hez2010 opened this issue May 19, 2024 · 3 comments
Labels
AOT bug Something isn't working

Comments

@hez2010
Copy link
Contributor

hez2010 commented May 19, 2024

Describe the bug
The below exception occurred in TypeNameSupport.ResolveGenericType when PublishAot is set to true but not running under NativeAOT.

System.NotSupportedException: 'Cannot provide generic type from 'Windows.Foundation.IAsyncOperation`1'.'

To Reproduce

  1. Checkout the aot branch of https://github.com/hez2010/WinRTServer/tree/aot
  2. Run the project directly in VS

Expected behavior
No exception.

Version Info
Package built from staging/AOT branch.

Additional context

RuntimeFeature.IsDynamicCodeCompiled will be set to true if PublishAot is set to true in csproj, regardless of whether the executable is published with NativeAOT or not.

@hez2010 hez2010 added the bug Something isn't working label May 19, 2024
@manodasanW
Copy link
Member

manodasanW commented May 19, 2024

I assume this is a first chance exception that is caught that you are seeing and that things still work or does it also crash?

@hez2010
Copy link
Contributor Author

hez2010 commented May 20, 2024

You are right. It's a first chance exception. It doesn't crash.

@manodasanW
Copy link
Member

Yea that is known, I will keep this open to track this until I decide if I want to leave it as is or put in some logic to handle that which in theory isn't really needed as we got type information later on which we use.

@manodasanW manodasanW added the AOT label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants