简体   繁体   中英

Can a .net program written for windows work on osx?

I recently wrote a small app which will grab contacts from microsoft Outlook and then create a csv and email to the head office.

The app works a treat but the only issue we have is some of our sales team use mac books with the mac version of office.

Is there a way in which the .net app which has been written in c# can work on the osx machines or is it a case of looking into writing it in a different language and seeing if there is a way of plugging into outlook.

Your C# program can work in OSX if Mono (.NET for Unix/Linux) is installed on it.

However, I don't think Office assemblies (the ones you referenced in your project) are going to work on OSX because those are wrapper .NET assemblies for Office COM native objects which are Windows OS dependent.

Application in DotNet can run into OSX when Mono in installed on the Mac Book, But not all of the exact code in DotNet. you can check your code with the MoMa(Mono Migration Analyzer) that "is your code could run in Linux/Unix operation system with mono?"

you can find the MoMa (it's free) in hear: http://www.mono-project.com/docs/tools+libraries/tools/moma/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM