7 questions
4
votes
1
answer
553
views
Generic parameter does not have matching annotations in .NET 8 AOT
I have a helper method that returns a list of public static readonly fields of a type:
public static ReadOnlyCollection<T> GetFields<T>()
where T : class
{
return typeof(T)....
2
votes
1
answer
1k
views
NET8 NativeAOT: Type.GetProperties() doesn't work for some types but does for others! why? [duplicate]
I have a program which was successfully published with NET8 NativeAOT, but Type.GetProperties() works for some class where properties r returned properly, but not for others, where it returns no ...
2
votes
2
answers
442
views
Is it possible to increase C# AOT inline method length limit?
When I force the C# AOT compiler with MethodImpl(MethodImplOptions.AggressiveInlining) to do a really long method:
At the very end, it stops inlining and starts calling every possible method (even ...
1
vote
1
answer
5k
views
Can't compile with Native AOT about JsonSerializer.Deserialize
The framework I am using is .Net7.
Here is my code:
var Options=new JsonSerializerOptions()
{
Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(UnicodeRanges.All)
};
List<ThemeModel&...