Hi just a quick question regarding compatibility to other non MS OS. Is there a intermediate language compiler for other platforms such as Linux?

Dani AI

Generated

As asked about cross-platform IL and pointed toward a Linux option, there are two practical ways to ship a .NET app that can run on both Windows and Linux. If the code stays in managed, cross-platform APIs, the assemblies Visual Studio produces can often run unchanged on Linux under a compatible runtime. The alternative is to produce platform-specific, self-contained builds that bundle the runtime so no extra install is required.

No special Mono compiler needs to be "added" into a Visual Studio project for a cross-platform release. For legacy .NET Framework apps, build in Visual Studio and include the output assemblies on the CD with a small Linux launcher and either a bundled runtime or instructions to install the runtime on the target machine. For modern projects, retarget to .NET Core/.NET and publish platform-specific artifacts (for example dotnet publish -r linux-x64 --self-contained true -c Release) and add both Windows and Linux folders to the release medium. Watch for Windows-only APIs (COM, registry, many native calls, WPF) and GUI differences (WinForms support is partial on some runtimes). Test the chosen runtime on the target distro. See the Mono project for a runtime-based route and the dotnet publish docs for self-contained publishing and packaging details (Mono project , dotnet publish docs).

Recommended Answers

All 2 Replies

For linux try the Mono framework. I'm no expert on it though.

Thanks for the reply, but i was wondering if the compiler from mono can be added to a project designed in visual studio, for release, to enable the release CD to have the option of Linux or Windows install

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.