C
C#13mo ago
hydos

❔ Making a C# library with dotnet 7 AOT issues

I want the ability to have classes in my method arguments but the UnmanagedCallersOnlyAttribute stops me. Is there anything I can do about this?
7 Replies
ero
ero13mo ago
have unmanaged structs in your method arguments
hydos
hydos13mo ago
So I just can’t use classes Because I don’t see why I couldn’t since it’s native ahead of time the layout of the class in memory should be known Anyways new question Can an aot c# program call a managed c# library somehow
ero
ero13mo ago
normal dllimports or libraryimports should do
hydos
hydos13mo ago
sorry i meant managed C# library is that still possible?
ero
ero13mo ago
i mean as long as you include it as a project reference, sure? or a nuget or any other reference really
hydos
hydos13mo ago
ah i assumed it wouldnt work because that library requires the C# runtime to run thanks for the help
Accord
Accord13mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts