Compile C# based Windows (WinForms App) application to run on Mac OS High Sierra or Mojave












2















I have built an (Windows Forms App) application on Windows in C#. Now, I would like to target this whole project / application to mac OS without changing the application. Is there any easy way to achieve it? I don't want to rebuild the entire app from scratch on MAC. I don't want to use virtual machine on MAC... I have Visual Stuido 2017 and a paired MAC. But, I'm lost here.










share|improve this question




















  • 1





    I think your choice would be Mono, an open source implementation of .net.

    – Ezequiel Barbosa
    Nov 25 '18 at 10:35













  • If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

    – Philippe
    Nov 25 '18 at 10:36











  • I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

    – Ezequiel Barbosa
    Nov 25 '18 at 10:37











  • This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

    – Abdisamad Khalif
    Nov 25 '18 at 10:38











  • Also give a look at UNO Platform platform.uno

    – Tony
    Nov 25 '18 at 10:52
















2















I have built an (Windows Forms App) application on Windows in C#. Now, I would like to target this whole project / application to mac OS without changing the application. Is there any easy way to achieve it? I don't want to rebuild the entire app from scratch on MAC. I don't want to use virtual machine on MAC... I have Visual Stuido 2017 and a paired MAC. But, I'm lost here.










share|improve this question




















  • 1





    I think your choice would be Mono, an open source implementation of .net.

    – Ezequiel Barbosa
    Nov 25 '18 at 10:35













  • If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

    – Philippe
    Nov 25 '18 at 10:36











  • I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

    – Ezequiel Barbosa
    Nov 25 '18 at 10:37











  • This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

    – Abdisamad Khalif
    Nov 25 '18 at 10:38











  • Also give a look at UNO Platform platform.uno

    – Tony
    Nov 25 '18 at 10:52














2












2








2


1






I have built an (Windows Forms App) application on Windows in C#. Now, I would like to target this whole project / application to mac OS without changing the application. Is there any easy way to achieve it? I don't want to rebuild the entire app from scratch on MAC. I don't want to use virtual machine on MAC... I have Visual Stuido 2017 and a paired MAC. But, I'm lost here.










share|improve this question
















I have built an (Windows Forms App) application on Windows in C#. Now, I would like to target this whole project / application to mac OS without changing the application. Is there any easy way to achieve it? I don't want to rebuild the entire app from scratch on MAC. I don't want to use virtual machine on MAC... I have Visual Stuido 2017 and a paired MAC. But, I'm lost here.







c# windows macos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 6:49







ThomAce

















asked Nov 25 '18 at 10:33









ThomAceThomAce

865




865








  • 1





    I think your choice would be Mono, an open source implementation of .net.

    – Ezequiel Barbosa
    Nov 25 '18 at 10:35













  • If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

    – Philippe
    Nov 25 '18 at 10:36











  • I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

    – Ezequiel Barbosa
    Nov 25 '18 at 10:37











  • This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

    – Abdisamad Khalif
    Nov 25 '18 at 10:38











  • Also give a look at UNO Platform platform.uno

    – Tony
    Nov 25 '18 at 10:52














  • 1





    I think your choice would be Mono, an open source implementation of .net.

    – Ezequiel Barbosa
    Nov 25 '18 at 10:35













  • If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

    – Philippe
    Nov 25 '18 at 10:36











  • I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

    – Ezequiel Barbosa
    Nov 25 '18 at 10:37











  • This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

    – Abdisamad Khalif
    Nov 25 '18 at 10:38











  • Also give a look at UNO Platform platform.uno

    – Tony
    Nov 25 '18 at 10:52








1




1





I think your choice would be Mono, an open source implementation of .net.

– Ezequiel Barbosa
Nov 25 '18 at 10:35







I think your choice would be Mono, an open source implementation of .net.

– Ezequiel Barbosa
Nov 25 '18 at 10:35















If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

– Philippe
Nov 25 '18 at 10:36





If you have used the .net core framework, you can run your application on a mac, if the framework is installed there.

– Philippe
Nov 25 '18 at 10:36













I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

– Ezequiel Barbosa
Nov 25 '18 at 10:37





I remember that back them when I used it to compile a Windows Form project on Linux, it worked but I basically had two problems, which were the inability to edit Windows forms on it (even though it ran Windows forms normally) and the necessity to deploy using MySql instead of SQL Server (but now you have SQL server for Linux)

– Ezequiel Barbosa
Nov 25 '18 at 10:37













This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

– Abdisamad Khalif
Nov 25 '18 at 10:38





This SO question is what you are looking for - stackoverflow.com/questions/22661589/…

– Abdisamad Khalif
Nov 25 '18 at 10:38













Also give a look at UNO Platform platform.uno

– Tony
Nov 25 '18 at 10:52





Also give a look at UNO Platform platform.uno

– Tony
Nov 25 '18 at 10:52












2 Answers
2






active

oldest

votes


















1














;TLDR Mono, using WinForms and MonoDevelop IDE for development.



.NET Framework is the full implementation that includes everything but runs only on Windows.



.NET Core is the newer OpenSource implementation of .Net framework but doesn't include WPF/WinForms - because those rely heavily on DirectX/GDI essentially making them Windows only.



Xamarin. Xamarin based off of Mono framework branched more towards iOS and Android. There is a Xamarin Mac but it supports the same GTK# based UI toolkit as Mono.There is a WinForms equivalent UI toolkit as well called Xamarin Forms but it is mobile only (iOS, Android & Universal Windows Platform)



Mono. Mono is OpenSource implementation of .Net framework, uses GTK# by default for UI. Does run fine on all of Windows, Linux, macOS. Uses GTK# as underlying UI toolkit on all OSes including Windows.



What's Cross Platform? There is a subset of Base Class Library, called .NET Standard Library - as well as the compilers platform, only these subsets of .Net are truly cross-platform.



To sum it up,
Mono does however support Windows Forms on both Linux & macOS.
Except some corner cases it works very well.
However the UI look and feel is Windows only. It is like running Windows applications under WINE. Default Mono IDE is MonoDevelop.



Xamarin Mac is great if you want to write a new application from scratch since Xamarin Mac exposes you full macOS SDK and offers its own IDE (Xamarin Studio).



In your situation though, Mono is best option. After having installed mono you can even try running your current app as mono appName from terminal. It should render the UI even if the paths and other resources are broken.






share|improve this answer
























  • Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

    – ThomAce
    Jan 3 at 9:17



















0














You have to use .NET Core (not .NET Framework) to run app properly on different OS than Windows.



Differences between platforms explained






share|improve this answer
























  • "have to" might not be correct. Like what you linked, Xamarin has its landscapes.

    – Lex Li
    Dec 1 '18 at 17:09













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466621%2fcompile-c-sharp-based-windows-winforms-app-application-to-run-on-mac-os-high-s%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














;TLDR Mono, using WinForms and MonoDevelop IDE for development.



.NET Framework is the full implementation that includes everything but runs only on Windows.



.NET Core is the newer OpenSource implementation of .Net framework but doesn't include WPF/WinForms - because those rely heavily on DirectX/GDI essentially making them Windows only.



Xamarin. Xamarin based off of Mono framework branched more towards iOS and Android. There is a Xamarin Mac but it supports the same GTK# based UI toolkit as Mono.There is a WinForms equivalent UI toolkit as well called Xamarin Forms but it is mobile only (iOS, Android & Universal Windows Platform)



Mono. Mono is OpenSource implementation of .Net framework, uses GTK# by default for UI. Does run fine on all of Windows, Linux, macOS. Uses GTK# as underlying UI toolkit on all OSes including Windows.



What's Cross Platform? There is a subset of Base Class Library, called .NET Standard Library - as well as the compilers platform, only these subsets of .Net are truly cross-platform.



To sum it up,
Mono does however support Windows Forms on both Linux & macOS.
Except some corner cases it works very well.
However the UI look and feel is Windows only. It is like running Windows applications under WINE. Default Mono IDE is MonoDevelop.



Xamarin Mac is great if you want to write a new application from scratch since Xamarin Mac exposes you full macOS SDK and offers its own IDE (Xamarin Studio).



In your situation though, Mono is best option. After having installed mono you can even try running your current app as mono appName from terminal. It should render the UI even if the paths and other resources are broken.






share|improve this answer
























  • Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

    – ThomAce
    Jan 3 at 9:17
















1














;TLDR Mono, using WinForms and MonoDevelop IDE for development.



.NET Framework is the full implementation that includes everything but runs only on Windows.



.NET Core is the newer OpenSource implementation of .Net framework but doesn't include WPF/WinForms - because those rely heavily on DirectX/GDI essentially making them Windows only.



Xamarin. Xamarin based off of Mono framework branched more towards iOS and Android. There is a Xamarin Mac but it supports the same GTK# based UI toolkit as Mono.There is a WinForms equivalent UI toolkit as well called Xamarin Forms but it is mobile only (iOS, Android & Universal Windows Platform)



Mono. Mono is OpenSource implementation of .Net framework, uses GTK# by default for UI. Does run fine on all of Windows, Linux, macOS. Uses GTK# as underlying UI toolkit on all OSes including Windows.



What's Cross Platform? There is a subset of Base Class Library, called .NET Standard Library - as well as the compilers platform, only these subsets of .Net are truly cross-platform.



To sum it up,
Mono does however support Windows Forms on both Linux & macOS.
Except some corner cases it works very well.
However the UI look and feel is Windows only. It is like running Windows applications under WINE. Default Mono IDE is MonoDevelop.



Xamarin Mac is great if you want to write a new application from scratch since Xamarin Mac exposes you full macOS SDK and offers its own IDE (Xamarin Studio).



In your situation though, Mono is best option. After having installed mono you can even try running your current app as mono appName from terminal. It should render the UI even if the paths and other resources are broken.






share|improve this answer
























  • Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

    – ThomAce
    Jan 3 at 9:17














1












1








1







;TLDR Mono, using WinForms and MonoDevelop IDE for development.



.NET Framework is the full implementation that includes everything but runs only on Windows.



.NET Core is the newer OpenSource implementation of .Net framework but doesn't include WPF/WinForms - because those rely heavily on DirectX/GDI essentially making them Windows only.



Xamarin. Xamarin based off of Mono framework branched more towards iOS and Android. There is a Xamarin Mac but it supports the same GTK# based UI toolkit as Mono.There is a WinForms equivalent UI toolkit as well called Xamarin Forms but it is mobile only (iOS, Android & Universal Windows Platform)



Mono. Mono is OpenSource implementation of .Net framework, uses GTK# by default for UI. Does run fine on all of Windows, Linux, macOS. Uses GTK# as underlying UI toolkit on all OSes including Windows.



What's Cross Platform? There is a subset of Base Class Library, called .NET Standard Library - as well as the compilers platform, only these subsets of .Net are truly cross-platform.



To sum it up,
Mono does however support Windows Forms on both Linux & macOS.
Except some corner cases it works very well.
However the UI look and feel is Windows only. It is like running Windows applications under WINE. Default Mono IDE is MonoDevelop.



Xamarin Mac is great if you want to write a new application from scratch since Xamarin Mac exposes you full macOS SDK and offers its own IDE (Xamarin Studio).



In your situation though, Mono is best option. After having installed mono you can even try running your current app as mono appName from terminal. It should render the UI even if the paths and other resources are broken.






share|improve this answer













;TLDR Mono, using WinForms and MonoDevelop IDE for development.



.NET Framework is the full implementation that includes everything but runs only on Windows.



.NET Core is the newer OpenSource implementation of .Net framework but doesn't include WPF/WinForms - because those rely heavily on DirectX/GDI essentially making them Windows only.



Xamarin. Xamarin based off of Mono framework branched more towards iOS and Android. There is a Xamarin Mac but it supports the same GTK# based UI toolkit as Mono.There is a WinForms equivalent UI toolkit as well called Xamarin Forms but it is mobile only (iOS, Android & Universal Windows Platform)



Mono. Mono is OpenSource implementation of .Net framework, uses GTK# by default for UI. Does run fine on all of Windows, Linux, macOS. Uses GTK# as underlying UI toolkit on all OSes including Windows.



What's Cross Platform? There is a subset of Base Class Library, called .NET Standard Library - as well as the compilers platform, only these subsets of .Net are truly cross-platform.



To sum it up,
Mono does however support Windows Forms on both Linux & macOS.
Except some corner cases it works very well.
However the UI look and feel is Windows only. It is like running Windows applications under WINE. Default Mono IDE is MonoDevelop.



Xamarin Mac is great if you want to write a new application from scratch since Xamarin Mac exposes you full macOS SDK and offers its own IDE (Xamarin Studio).



In your situation though, Mono is best option. After having installed mono you can even try running your current app as mono appName from terminal. It should render the UI even if the paths and other resources are broken.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 8:21









Abdullah LeghariAbdullah Leghari

1,10931932




1,10931932













  • Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

    – ThomAce
    Jan 3 at 9:17



















  • Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

    – ThomAce
    Jan 3 at 9:17

















Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

– ThomAce
Jan 3 at 9:17





Thank you. So is that simple? I have simply downloaded Mono 32bit in to my Windows system and executed the previously compiled WinForms app. It worked pretty well. Except some visual glitches, but acceptable way. Many thanks for your feedback!

– ThomAce
Jan 3 at 9:17













0














You have to use .NET Core (not .NET Framework) to run app properly on different OS than Windows.



Differences between platforms explained






share|improve this answer
























  • "have to" might not be correct. Like what you linked, Xamarin has its landscapes.

    – Lex Li
    Dec 1 '18 at 17:09


















0














You have to use .NET Core (not .NET Framework) to run app properly on different OS than Windows.



Differences between platforms explained






share|improve this answer
























  • "have to" might not be correct. Like what you linked, Xamarin has its landscapes.

    – Lex Li
    Dec 1 '18 at 17:09
















0












0








0







You have to use .NET Core (not .NET Framework) to run app properly on different OS than Windows.



Differences between platforms explained






share|improve this answer













You have to use .NET Core (not .NET Framework) to run app properly on different OS than Windows.



Differences between platforms explained







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 11:56









Bartłomiej StasiakBartłomiej Stasiak

54




54













  • "have to" might not be correct. Like what you linked, Xamarin has its landscapes.

    – Lex Li
    Dec 1 '18 at 17:09





















  • "have to" might not be correct. Like what you linked, Xamarin has its landscapes.

    – Lex Li
    Dec 1 '18 at 17:09



















"have to" might not be correct. Like what you linked, Xamarin has its landscapes.

– Lex Li
Dec 1 '18 at 17:09







"have to" might not be correct. Like what you linked, Xamarin has its landscapes.

– Lex Li
Dec 1 '18 at 17:09




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466621%2fcompile-c-sharp-based-windows-winforms-app-application-to-run-on-mac-os-high-s%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen