Reputation: 1048
Are binaries compiled with Visual Studio or msbuild on a Windows operating system 100% compatible with running under Mono in Linux? For example could I compile the binary in Visual Studio or msbuild on Windows and then package it up to be used on Linux or would I need to build the binary using mono on a Linux operating system in order to ensure full compatibility?
Specifically I need to know if a binary generated in Visual Studio 2019 would be 100% compatible under Linux using Mono 5.10
Upvotes: 0
Views: 133
Reputation: 76499
In many cases, the binaries that you build on Windows will work just fine under Mono or .NET Core on Linux. Many interfaces will work on both, although .NET Core is going to be more complete.
However, the only way to know for certain is to test. Even if you produced perfect binaries and Mono had support for every API called, you might still use paths with backslashes in them, which Linux won't support. You won't know that unless you run your testsuite on Linux with your desired interpreter. This is where a suitable CI setup can help, since it lets you run most of those tests automatically.
Upvotes: 2