- When developing an application in .Net Core, the .NET dependencies and DLLs are embedded in the application? does this mean that I do NOT need to install the .Net dependencies on the client PC?
- If I develop a .Net Core console application for Linux, is it necessary to install Mono on the PC with Linux (client)?
- Are .Net core applications compatible with Android?
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- Is shmid returned by shmget() unique across proces
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
To your question:
No the dependencies are NOT embedded in the application (no static linking in .NET).
Yes, the dependencies are added as separate files, when you publish (self-contained).
If your application is a .NET-Core application, you do NOT need the .NET-Core framework installed. Neither do you need Mono.
You can do a self-contained deployment for each platform:
Windows-x86-32:
Windows-x86-64:
Linux-x86-32: NOT SUPPORTED BY .NET-Core
Linux-x86-64:
Linux ARM (Android/ChromeOS)
Linux-arm-64: NOT SUPPORTED BY .NET-Core
This adds all dependencies, including the .NET-Core runtime libraries. You can still run into problems if a used DLL references a native-dll (that it provides as embedded resource), but does not provide the necessary C-Runtime-libraries (e.g. when the native-dll/.so is dynamically linked - such as in SkiaSharp).
Also, .NET-Core can be run with the shared-framework, which means deployment size is smaller, but the shared-framework-version must be installed, then.
However, it is unclear to me what you want to do with .NET Core on Android. Since .NET does not implement any Android-UI interfaces. Xamarin-Forms might support Android-UI with .NET-Core - it certainly does with mono. You could however run a web/other-server on Android, or a console application.
See CoreDroid
Mono and .NET Core are two separate technologies.
Mono was created by Miguel de Icaza and was originally designed to be a version of .NET Framework for Linux and MacOS. As such, it has a lot of the same APIs that .NET Framework has.
.NET Core is a cross platform implementation of .NET Standard. As such, it only has access to the APIs outlined in the .NET Standard.
Applications built using .NET Core will need the .NET Core run-time to be installed on the target machine in order to run them (depending on whether you do a self contained deploy or a framework dependant deployment). The .NET Core run-time and SDK can be obtained by heading to dot.net/core.
In the same way, applications built with Mono will require the Mono run-time to be installed on the target machine.
As Lexi-Li pointed out, I would take a look at The official documentation for .NET Core in order to learn more about the different deployment options.