Return to site

Can You Run Visual Studio On A Mac

broken image


Disclaimer: I am not on the .NET Core Team. I used the tools available publicly and have no insights into the future of .NET Core. It looks very bright though. :)

The working source code for this project can be found here.

Intro

Yes, the Mac user can run Windows emulation to run your program. Through Xamarin, you can compile your program to run on Mac. You'll need a Xamarin account to do this. Right now you'll also need to download some additional packages for Visual Studio; when VS2015 is released, Xamarin tools will be included (you'll still need a Xamarin account). With the power of Roslyn, Visual Studio for Mac brings IntelliSense to your fingertips. IntelliSense describes APIs as you type and uses auto-completion to increase the speed and accuracy of how you write code. Quick Info tool tips let you inspect API definitions. Squiggly lines in the editor highlight issues in real time as you type. Microsoft Visual Studio for Mac is an excellent IDE that you can use on Apple's MacIntosh platform. With varying levels of subscriptions and a free version, it is an affordable option for the individual developer and small team.

I downloaded visual basic for mac yesturday and opened up a project which I previously worked on for it not to work. Is there anyway of fixing this or is there anyone who has worked with visual basic for the mac that has any advice. I was also wondering about using a virtual box so I can run the windows virtual studio on my mac. Download the installer from the Visual Studio for Mac download page. Once the download is complete, click the VisualStudioforMacInstaller.dmg to mount the installer, then run it by double-clicking the arrow logo: You may be presented with a warning about the application being downloaded from the Internet.

A complete list of post in this series is included below :

In this post, we're going to look at running the app from the command line and then the Mac.

Running the App in the Windows Command Prompt

Can You Run Visual Studio On A Mac

Can You Run Visual Studio On A Mac Os

While you can obviously run the app inside of Visual Studio with the F5 command. You should also know that you can run the app inside of the console. Before we begin, make sure you have the app found here. After opening the app or downloading it, open the folder containing the project in the command prompt.

You can run your application here by simply typing :

You will the following output :

Visual studio enterprise for mac

Can You Run Visual Studio On A Mac Os

While you can obviously run the app inside of Visual Studio with the F5 command. You should also know that you can run the app inside of the console. Before we begin, make sure you have the app found here. After opening the app or downloading it, open the folder containing the project in the command prompt.

You can run your application here by simply typing :

You will the following output :

The exact same result from running the console app in Visual Studio.

Using dotnet publish to get the app ready for Mac

Go ahead and type dotnet publish on the command prompt and then type tree to look at your directory listing as shown below :

You should see the publish directory. Navigate into it and list out the files in the directory :

Take note that the dlls listed below are related to the package reference that we added in the last blog post.

  • Newtonsoft.Json.dll
  • System.Runtime.Serialization.Primitives.dll

This only leaves the NetCoreConsoleApp.dll which is the Console application that we can run on a Mac (or any other platform that supports .NET Core).

Running the app on a Mac

Visual Studio Express For Mac

Finally! It is about time you might say. I agree. Before you can run the app on your Mac, you're going to need to head back over to the .NET Core downloads page and install OpenSSL and then the SDK (or runtime) if you remember the difference from the first post.

Visual Studio Mac Extensions

To run this on your Mac, you'll need to copy the ‘publish' folder to your Mac. Then open Terminal and you can run the app by just typing :

This is awesome! Now you have an app that run on another platform and you used your existing .NET skillset to create it. I'm LOVING .NET Core!

Wrap-up

OK, I'm going to take a break and I'll be back next week. As always, thanks for reading and smash one of those share buttons to give this post some love if you found it helpful. Also, feel free to leave a comment below or follow me on twitter for daily links and tips.





broken image