C
C#2y 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
ero2y ago
have unmanaged structs in your method arguments
hydos
hydosOP2y 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
ero2y ago
normal dllimports or libraryimports should do
hydos
hydosOP2y ago
sorry i meant managed C# library is that still possible?
ero
ero2y ago
i mean as long as you include it as a project reference, sure? or a nuget or any other reference really
hydos
hydosOP2y ago
ah i assumed it wouldnt work because that library requires the C# runtime to run thanks for the help
Accord
Accord2y 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