Open MichalStrehovsky opened 3 years ago
- COM and SAFEARRAY marshalling
Does it mean WinForms and WPF won't be supported? Because I think both of those require COM support.
We'll need to build tools that convert COM interop into something AOT friendlier before the AOT compiler ever sees it - similar to how CsWinRT does it for WinRT.
There's been a lot of discussions about this e.g. here https://github.com/dotnet/corert/issues/4219.
Sorry to bother, but what about Assembly.Load
, Assembly.LoadFrom
or AssemblyName.GetAssemblyName
? Since NativeAOT/CoreRT doesn't support Entity Framework, my idea was to put all the EF stuff in a secondary library and then call it with the Assembly functions or Reflection, but it seems it's not even possible. Such a deal-breaker.
However, investigating I found out that @tonerdo https://github.com/dotnet/corert/issues/5011#issuecomment-408715555 did have some success getting Assembly.Load
to work with some kind of experimental code/libs.
Is there any way to see this implemented in the short/mid term anytime soon? What can we do (or needs to be done) for this to work? Considering there was a successful test some time ago?
That would require ability to load managed plugins. We do not have plans to do that as part of this project. There is a lot of discussion on the reasons behind that in https://github.com/dotnet/runtimelab/issues/248.
Is Assembly.GetEntryAssembly().Location
the same? I hit this which returns a null instead of the entry assembly location.
No managed assembly exists after compilation. Native EXE != assembly. This is the same as when publishing single file in .NET 5.
similar to how CsWinRT does it for WinRT
Unfortunately, CsWinRT is not aot friendly at all. You may want to see the disaster: https://github.com/microsoft/CsWinRT/blob/c181cb45f2b92d663a736e966982c93516403f21/src/WinRT.Runtime/TypeExtensions.cs
The last one can be knocked off the list #77472 =)
Please support for Marshal.GetDelegateFunctionPointer<>()
in NativeAot! I tested own GameLauncher with loading native libraries ( ported from Half-Life + Engine without client and server ) GameLauncher uses PublishSingleFile and PublishTrimmed and Engine ( native library ) uses PublishAot, StripSymbols. I am excited to release game written in C# because I want release games in 64Bit. If GameLauncher should use PublishAot, StripSymbols and native executable.
Please support for Marshal.GetDelegateFunctionPointer<>()
Function pointers are more performant and AOT friendly replacement for Marshal.GetDelegateFunctionPointer
. Can you use them instead? If you need help with how to switch to function pointers, please open a new issue or discussion on it.
Sorry to bother, but what about
Assembly.Load
,Assembly.LoadFrom
orAssemblyName.GetAssemblyName
?
Seems like GetAssemblyName
works with .NET 8 and 9: AssemblyName.GetAssemblyName("/path/to/foo.dll")
throw new object()
)LoadFrom
,LoadFromAssemblyPath
)Type.GetType
expecting to see the calling assembly of the reflection call)