-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Native runtime packages compatible with .NET Framework (AnyCPU)? #4
Comments
After a lot of investigation, I found the problem: using platform "AnyCPU" will not copy any native DLL to the target directory. So I need to add With a specific platform, the native DLL will be copied to \dotnet\examples\Example\bin<platform>\Debug\net461 (or any other .NET Framework identified) - straight, not in a runtimes subfolder. Then it will work to load it during runtime. I will leave this issue open because I will investigate a bit whether a "AnyCPU" solution can be found. If I do so, I will post it here. |
currently I use the code: dotnet-native/dotnet/Mizux.DotnetNative.csproj.in Lines 4 to 5 in 09f088b
and for the native library: dotnet-native/dotnet/Mizux.DotnetNative.runtime.csproj.in Lines 3 to 5 in 2b2c3b7
You should change theses TFM also IMHO. also don't hesitate to clean your local cache |
did you try to update this line ?
AFAIK TFM netcoreapp3.1 and net6.0 will look into native/ dir to load native library so we put them here, you need to reverse native library auto loading in net461 etc...
You may take a look at |
How can I produce runtime packages compatible with .NET Framework?
I tried to change the framework identified netcoreapp3.1 to netstandard2.0 or net461 but I failed to produce working examples.
The reason why I fail to run the examples is that there are no native DLLs copied to the binary space for the example project:
Analysis of the differences:
The nuspec files for the wrapper and native package are the same except for the targetFramework identifier.
Are runtime packages restricted to .NET core and .NET 5.0+ ?
The text was updated successfully, but these errors were encountered: