Is a DLL developed in .NET is accessible from any language or operating system?

I am creating a DLL that I want to distribute to public to use it the way they want. This DLL contains common utility functions. People can use it on any operating system and with any language or framework. So, I want to ask that the DLL created using .NET 3.5 or above is accessible from other languages, operating systems or frameworks? Or do I need to write these functions in other language too or for different operating systems? I know only C# and I don’t want to spend money for a free publicly distributed library.

3

A .NET DLL contains Intermediate Language which requires the .NET runtime to execute it and probably some .NET base libraries that it uses/depends on.

This means that the DLL can only be used on hardware/operating systems that have a matching .NET Framework available.

Writing code for all possible platforms is nearly impossible and I would advise you to figure out what platforms you really need to support because even when you find a way to run the DLL on all platforms it would cost a lot of effort to actually test it on all platforms and support it on all platforms. It will be a lot cheaper/easier to cover the key/main operating systems for your clients.

A DLL is a format used for shared libraries by the Microsoft Windows operating system. Other operating systems use other formats, and since DLLs are binary they cannot generally be used on other processor architectures such as ARM devices. Therefore, DLLs are of no or little use under Mac OS X, on Linux-based operating systems such as Ubuntu, and on mobile devices (e.g. running iOS, Android, or Windows Phone).

(the point about processor architectures is not quite true since C# programs are typically compiled to intermediate bytecode that’s architecture-independent. However, other DLLs don’t have this flexibility)

Furthermore, code written in C# will typically require the .NET framework or at least the .NET runtime in order to work. Different Windows operating systems support different .NET libraries. Code targeting the desktop might not work on mobile devices. Microsoft’s .NET libraries are not currently available on non-Windows systems.

While your C#-written DLL will be of little use on non-Windows systems, there are a few possibilities to make your code more widely usable:

  • The WINE project offers a Windows compatibility layer for Unix-like operating systems. Provided that the processor architecture matches, this allows users to run EXEs, which may also use DLLs. However, WINE is not viable mechanism for making libraries usable. Unfortunately, the WINE project – as a volunteer effort – is lagging years behind in Windows features.

  • The Mono project offers a reimplemenation of the .NET framework and the C# language which runs on a variety of devices and operating system, including Linux and mobile devices. You could then recompile your library for each target system using Mono. However, the Mono implementation is lagging years behind, so you will not be able to use modern language features or newer additions to .NET APIs. Porting your code to Mono is possible, but may take some effort. Microsoft has announced that it will add support for non-Windows systems, but until then Mono is your best bet.

  • If you are content with only targeting Windows systems, offer compiled packages via NuGet. This makes it easy for other C# programmers to get and incorporate your library.

  • Consider publishing the source code. This makes debugging much easier for users of your library, and helps others help you. GitHub is a good place to start of you’re using Git for version control.

  • Forget C#, and use a language that’s really cross-platform. However, you’ll always lock into a specific ecosystem. If you go with Java, your library can only be used from other languages running on the JVM (but the JVM runs on any operating system). Nearly any language can easily interface with a library written in C, but writing C is difficult (even more so if you want your code to be portable).

There may be more newer ways, but it’s been a couple of years since I last wrote C#…

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật