-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
NativeAOT cannot create generic type even if it is rooted using rd.xml #79930
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionWhen attempt to run Blazor Hybrid + Winforms I ecounter following issue in the Location of the issue is here Reproduction StepsProgram.cs // See https://aka.ms/new-console-template for more information
var task = Task.CompletedTask;
var result = System.Activator.CreateInstance(typeof(T<>).MakeGenericType(task.GetType().GetGenericArguments()[0]));
Console.WriteLine("Success!");
class T<TT>
{
} rd.xml <?xml version="1.0" encoding="utf-8" ?>
<Directives>
<Application>
<Assembly Name="testaot" Dynamic="Required All">
<Type Name="T`1[[System.Threading.Tasks.VoidTaskResult,System.Private.CoreLib]]" Dynamic="Required All" />
</Assembly>
<Assembly Name="System.Private.CoreLib">
<Type Name="System.Threading.Tasks.VoidTaskResult" Dynamic="Required All" />
</Assembly>
</Application>
</Directives> Expected behaviorResulting program produce "Success!"; Actual behavior
Regression?No Known WorkaroundsDid not exists probably Configuration.NET 7.0.1 Other informationNo response
|
Not sure, but type which is passed as parameter to |
Try adding |
That seems to be unblock me on that specific matter.
Пт, 23 дек. 2022 г. в 17:41, Michal Strehovský ***@***.***>:
… Try adding <IlcArg Include="--nometadatablocking" /> to an ItemGroup
—
Reply to this email directly, view it on GitHub
<#79930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAPKNY3DJJX25ZCXGLSFB3WOWFXJANCNFSM6AAAAAATHSO6NM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Getting rid of reflection blocking is tracked in #72570 but currently it's by design that is not possible to reflect on implementation details. |
Description
When attempt to run Blazor Hybrid + Winforms I ecounter following issue in the
Microsoft.JSInterop
Location of the issue is here
https://github.com/dotnet/aspnetcore/blob/95c74fef646a262909be462c9edda8d8ed4d5b24/src/JSInterop/Microsoft.JSInterop/src/Infrastructure/TaskGenericsUtil.cs#L31-L34
Reproduction Steps
Program.cs
rd.xml
Expected behavior
Resulting program produce "Success!";
Actual behavior
Regression?
No
Known Workarounds
Did not exists probably
Configuration
.NET 7.0.1
Other information
No response
The text was updated successfully, but these errors were encountered: