Return to site

Visual Studio For Mac Book

broken image


  1. Visual Studio For Macbook Pro
  2. Visual Studio 2017 Mac Download
  3. Visual Studio For Macbook
-->

There is still big difference, but it is being reduced from day to day and in order to understand that one needs some history. Visual Studio for Mac is successor of Xamarin.Studio and Xamarin.Studio was a combination of open source IDE MonoDevelop.

This guide describes how to use Pair to Mac to connect Visual Studio 2019to a Mac build host. The same instructions apply to Visual Studio 2017.

Overview

Hi OrchestraMusic, Welcome to the MSDN forum. Now we have two Visual Studio versions (Visual Studio for Mac, Visual Studio Code) that can directly install on the Mac (macOS), refer to your description, it looks like you installed the Visual Studio for Mac, it is a developer environment optimized for building mobile and cloud apps with Xamarin and.NET. VirtualBox vs Boot Camp for Visual Studio use on Mac Hello all. I have a development class writing C# code and Visual Studio for Mac by Microsoft doesn't cut it (I am used to running Visual Studio on Microsoft computers) and the Visual Studio program for Mac is not the same as it is on Microsoft. Visual Studio for Mac is something that many Microsoft developers have sought for more than a decade. As Mac OS X became interesting in the early 2000s, coders who spent most of their days working.

Building native iOS applications requires access to Apple's build tools,which only run on a Mac. Because of this, Visual Studio 2019 must connect toa network-accessible Mac to build Xamarin.iOS applications.

Visual Studio 2019's Pair to Mac feature discovers, connects to,authenticates with, and remembers Mac build hosts so that Windows-basediOS developers can work productively.

Pair to Mac enables the following development workflow:

  • Developers can write Xamarin.iOS code in Visual Studio 2019.

  • Visual Studio 2019 opens a network connection to a Mac build host anduses the build tools on that machine to compile and sign the iOS app.

  • There is no need to run a separate application on the Mac – VisualStudio 2019 invokes Mac builds securely over SSH.

  • Visual Studio 2019 is notified of changes as soon as they happen. Forexample, when an iOS device is plugged in to the Mac or becomes availableon the network, the iOS Toolbar updates instantly.

  • Multiple instances of Visual Studio 2019 can connect to the Macsimultaneously.

  • It's possible to use the Windows command-line to build iOS applications.

Note

Before following the instructions in this guide, complete the following steps:

  • On a Windows machine, install Visual Studio 2019
  • On a Mac, install Xcode and Visual Studio for Mac
    • You must manually open Xcode after installing so that it can add any additional components.

If you would prefer not to install Visual Studio for Mac, Visual Studio 2019can automatically configure the Mac build host with Xamarin.iOS and Mono.You must still install and run Xcode.For more information, see Automatic Mac provisioning.

Enable remote login on the Mac

To set up the Mac build host, first enable remote login:

  1. On the Mac, open System Preferences and go to the Sharing pane.

  2. Check Remote Login in the Service list.

    Make sure that it is configured to allow access for All users, orthat your Mac username or group is included in the list of allowedusers.

  3. If prompted, configure the macOS firewall.

    If you have set the macOS firewall to block incoming connections, youmay need to allow mono-sgen to receive incoming connections. An alertappears to prompt you if this is the case.

  4. If it is on the same network as the Windows machine, the Mac shouldnow be discoverable by Visual Studio 2019. If the Mac is still notdiscoverable, try manually adding a Mac or takea look at the troubleshooting guide.

Connect to the Mac from Visual Studio 2019

Now that remote login is enabled, connect Visual Studio 2019 to the Mac.

  1. In Visual Studio 2019, open an existing iOS project or create a new oneby choosing File > New > Project and then selecting an iOS projecttemplate.

  2. Open the Pair to Mac dialog.

    • Use the Pair to Mac button iOS toolbar:

    • Or, select Tools > iOS > Pair to Mac.

    • The Pair to Mac dialog displays a list of all previously-connectedand currently-available Mac build hosts:

  3. Select a Mac in the list. Click Connect.

  4. Enter your username and password.

    • The first time you connect to any particular Mac, you areprompted to enter your username and password for that machine:

      Tip

      When logging in, use your system username rather than full name.

    • Pair to Mac uses these credentials to create a new SSH connectionto the Mac. If it succeeds, a key is added to the authorized_keysfile on the Mac. Subsequent connections to the same Mac will loginautomatically.

  5. Pair to Mac automatically configures the Mac.

    Starting with Visual Studio 2019 version15.6,Visual Studio 2019 installs or updates Mono and Xamarin.iOS on aconnected Mac build host as needed (note that Xcode must still beinstalled manually). See Automatic Macprovisioning for more details.

  6. Look for the connection status icon.

    • When Visual Studio 2019 is connected to a Mac, that Mac's itemin the Pair to Mac dialog displays an icon indicating thatit is currently connected:

      There can be only one connected Mac at a time.

      Tip

      Right-clicking any Mac in the Pair to Mac list brings up a contextmenu that allows you to Connect.., Forget this Mac, orDisconnect:

      If you choose Forget this Mac, your credentials for the selectedMac will be forgotten. To reconnect to that Mac, you will need to re-enteryour username and password.

If you have successfully paired to a Mac build host, you are ready to buildXamarin.iOS apps in Visual Studio 2019. Take a look at theIntroduction to Xamarin.iOS for Visual Studioguide.

If you have not been able to pair a Mac, try manually adding aMac or take a look at the troubleshootingguide.

Manually add a Mac

If you do not see a particular Mac listed in the Pair to Mac dialog,add it manually:

  1. Locate your Mac's IP address.

    • Open System Preferences > Sharing > Remote Login on your Mac:

    • Alternatively, use the command line. In Terminal, issue this command:

      Depending on your network configuration, you may need to use aninterface name other than en0. For example: en1, en2, etc.

  2. In Visual Studio 2019's Pair to Mac dialog, select Add Mac..:

  3. Enter the Mac's IP address and click Add:

  4. Enter your username and password for the Mac:

    Tip

    When logging in, use your system username rather than full name.

  5. Click Login to connect Visual Studio 2019 to the Mac over SSH and addit to the list of known machines.

Automatic Mac provisioning

Starting with Visual Studio 2019 version 15.6,Pair to Mac automatically provisions a Mac with software necessary forbuilding Xamarin.iOS applications: Mono, Xamarin.iOS (the softwareframework, not the Visual Studio for Mac IDE), and various Xcode-relatedtools (but not Xcode itself).

Important

  • Pair to Mac cannot install Xcode; you must manually install it on theMac build host. It is required for Xamarin.iOS development.
  • Automatic Mac provisioning requires that remote login isenabled on the Mac, and the Mac must be network-accessible to the Windowsmachine. See Enabling remote login on the Macfor more details.
  • Automatic Mac provisioning requires 3GB of free space on the Mac to install Xamarin.iOS.

Pair to Mac performs necessary software installations/updates when VisualStudio 2019 is connecting to theMac.

Mono

Pair to Mac will check to make sure that Mono is installed. If it is notinstalled, Pair to Mac will download and install the latest stable versionof Mono on the Mac.

Progress is indicated by various prompts, as shown by the followingscreenshots (click to zoom):

MonoInstall CheckDownloadingInstalling

Xamarin.iOS

Pair to Mac upgrades Xamarin.iOS on the Mac to match the versioninstalled on the Windows machine.

Important

Pair to Mac will not downgrade Xamarin.iOS on the Mac from alpha/betato stable. If you have Visual Studio for Mac installed, set yourrelease channel asfollows: Select the encoding that makes your document readable mac.

  • If you use Visual Studio 2019, select the Stable updates channel inVisual Studio for Mac.
  • If you use Visual Studio 2019 Preview, select the Alpha updateschannel in Visual Studio for Mac.

Progress is indicated by various prompts, as shown by the followingscreenshots (click to zoom):

Xamarin.iOSInstall CheckDownloadingInstalling

Xcode tools and license

Pair to Mac will also check to determine whether Xcode has been installedand its license accepted. While Pair to Mac does not install Xcode, itdoes prompt for license acceptance, as shown in the following screenshots(click to zoom):

XcodeInstall CheckLicense Acceptance

Additionally, Pair to Mac will install or update various packagesdistributed with Xcode. For example:

  • MobileDeviceDevelopment.pkg
  • XcodeExtensionSupport.pkg
  • MobileDevice.pkg
  • XcodeSystemResources.pkg

The installation of these packages happens quickly and without a prompt.

Note

These tools are distinct from the Xcode Command Line Tools, whichas of macOS 10.9 areinstalled with Xcode.

Troubleshooting automatic Mac provisioning

If you encounter any trouble using automatic Mac provisioning, take a lookat the Visual Studio 2019 IDE logs, stored in%LOCALAPPDATA%XamarinLogs16.0. These logs may contain error messagesto help you better diagnose the failure or get support.

Book

Build iOS apps from the Windows command-line

Pair to Mac supports building Xamarin.iOS applications from the commandline. For example:

The parameters passed to msbuild in the above example are:

  • ServerAddress – The IP address of the Mac build host.
  • ServerUser – The username to use when logging in to the Mac build host.Use your system username rather than your full name.
  • ServerPassword – The password to use when logging in to the Mac build host.

Note

Visual Studio 2019 stores msbuild in the following directory:C:Program Files (x86)Microsoft Visual Studio2019MSBuildCurrentBin

The first time Pair to Mac logs in to a particular Mac build host fromeither Visual Studio 2019 or the command-line, it sets up SSH keys. With thesekeys, future logins will not require a username or password. Newlycreated keys are stored in %LOCALAPPDATA%XamarinMonoTouch.

If the ServerPassword parameter is omitted from a command-line buildinvocation, Pair to Mac attempts to log in to the Mac build hostusing the saved SSH keys.

Summary

This article described how to use Pair to Mac to connect Visual Studio 2019 to aMac build host, enabling Visual Studio 2019 developers to build native iOSapplications with Xamarin.iOS.

Next steps

Contents
  • Get the Flutter SDK
  • iOS setup
  • Android setup

System requirements

To install and run Flutter,your development environment must meet these minimum requirements:

  • Operating Systems: macOS (64-bit)
  • Disk Space: 2.8 GB (does not include disk space for IDE/tools).
  • Tools: Flutter depends on these command-line tools being availablein your environment.
    • bash
    • curl
    • git 2.x
    • mkdir
    • rm
    • unzip
    • which

Get the Flutter SDK

  1. Download the following installation bundle to get the lateststable release of the Flutter SDK:

    For other release channels, and older builds,see the SDK releases page.

  2. Extract the file in the desired location, for example:

    If you don't want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the Flutter repoon GitHub with the following command:

    You can also change branches or tags as needed.For example, to get just the stable version:

  3. Add the flutter tool to your path:

    This command sets your PATH variable for thecurrent terminal window only.To permanently add Flutter to your path, seeUpdate your path.

  4. Optionally, pre-download development binaries:

    The flutter tool downloads platform-specific development binaries asneeded. For scenarios where pre-downloading these artifacts is preferable(for example, in hermetic build environments,or with intermittent network availability), iOSand Android binaries can be downloaded ahead of time by running:

    For additional download options, see flutter help precache.

You are now ready to run Flutter commands!

Note: To update an existing version of Flutter, see Upgrading Flutter.

Run flutter doctor

Run the following command to see if there are any dependencies you need toinstall to complete the setup (for verbose output, add the -v flag):

This command checks your environment and displays a report to the terminalwindow. The Dart SDK is bundled with Flutter; it is not necessary to installDart separately. Check the output carefully for other software you mightneed to install or further tasks to perform (shown in bold text).

For example:

The following sections describe how to perform these tasks and finish the setupprocess.

Once you have installed any missing dependencies, run the flutter doctorcommand again to verify that you've set everything up correctly.

Warning: The flutter tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports. This data is used to help improve Flutter tools over time.

Flutter tool analytics are not sent on the very first run. To disable reporting, type flutter config --no-analytics. To display the current setting, type flutter config. If you opt out of analytics, an opt-out event is sent, and then no further information is sent by the Flutter tool.

By downloading the Flutter SDK, you agree to the Google Terms of Service. Note: The Google Privacy Policy describes how data is handled in this service.

Moreover, Flutter includes the Dart SDK, which may send usage metrics and crash reports to Google.

Update your path

You can update your PATH variable for the current session atthe command line, as shown in Get the Flutter SDK.You'll probably want to update this variable permanently,so you can run flutter commands in any terminal session.

The steps for modifying this variable permanently forall terminal sessions are machine-specific.Typically you add a line to a file that is executedwhenever you open a new window. For example:

  1. Determine the directory where you placed the Flutter SDK.You need this in Step 3.
  2. Open (or create) the rc file for your shell.Typing echo $SHELL in your Terminal tells youwhich shell you're using.If you're using Bash,edit $HOME/.bash_profile or $HOME/.bashrc.If you're using Z shell, edit $HOME/.zshrc.If you're using a different shell, the file pathand filename will be different on your machine.
  3. Add the following line and change[PATH_TO_FLUTTER_GIT_DIRECTORY] to bethe path where you cloned Flutter's git repo:

  4. Run source $HOME/.to refresh the current window,or open a new terminal window toautomatically source the file.
  5. Verify that the flutter/bin directoryis now in your PATH by running:

    Verify that the flutter command is available by running:

Note: As of Flutter's 1.19.0 dev release, the Flutter SDK contains the dart command alongside the flutter command so that you can more easily run Dart command-line programs. Downloading the Flutter SDK also downloads the compatible version of Dart, but if you've downloaded the Dart SDK separately, make sure that the Flutter version of dart is first in your path, as the two versions might not be compatible. The following command (on macOS, linux, and chrome OS), tells you whether the flutter and dart commands originate from the same bin directory and are therefore compatible. (Some versions of Windows support a similar where command.)

As shown above, the two commands don't come from the same bin directory. Update your path to use commands from /path-to-flutter-sdk/bin before commands from /usr/local/bin (in this case). After updating your shell for the change to take effect, running the which or where command again should show that the flutter and dart commands now come from the same directory.

To learn more about the dart command, run dart -h from the command line, or see the dart tool page.

Platform setup

macOS supports developing Flutter apps in iOS, Android,and the web (technical preview release).Complete at least one of the platform setup steps now,to be able to build and run your first Flutter app.

iOS setup

Install Xcode

To develop Flutter apps for iOS, you need a Mac with Xcode installed.

  1. Install the latest stable version of Xcode(using web download or the Mac App Store).
  2. Configure the Xcode command-line tools to use thenewly-installed version of Xcode byrunning the following from the command line:

    This is the correct path for most cases,when you want to use the latest version of Xcode.If you need to use a different version,specify that path instead.

  3. Make sure the Xcode license agreement is signed byeither opening Xcode once and confirming or runningsudo xcodebuild -license from the command line.

Versions older than the latest stable version may still work,but are not recommended for Flutter development.Using old versions of Xcode to target bitcode is notsupported, and is likely not to work.

With Xcode, you'll be able to run Flutter apps onan iOS device or on the simulator.

Set up the iOS simulator

To prepare to run and test your Flutter app on the iOS simulator,follow these steps:

  1. On your Mac, find the Simulator via Spotlight orby using the following command:

  2. Make sure your simulator is using a 64-bit device(iPhone 5s or later) by checking the settings inthe simulator's Hardware > Device menu.
  3. Depending on your development machine's screen size,simulated high-screen-density iOS devicesmight overflow your screen. Grab the corner of thesimulator and drag it to change the scale. You can alsouse the Window > Physical Size or Window > Pixel Accurateoptions if your computer's resolution is high enough.
    • If you are using a version of Xcode olderthan 9.1, you should instead set the device scalein the Window > Scale menu.

Create and run a simple Flutter app

To create your first Flutter app and test your setup,follow these steps:

  1. Create a new Flutter app by running the following from thecommand line:

  2. A my_app directory is created, containing Flutter's starter app.Enter this directory:

  3. To launch the app in the Simulator,ensure that the Simulator is running and enter:

Deploy to iOS devices

To deploy your Flutter app to a physical iOS deviceyou'll need to set up physical device deployment in Xcodeand an Apple Developer account. If your app is using Flutter plugins,you will also need the third-party CocoaPods dependency manager.

  1. You can skip this step if your apps do not depend onFlutter plugins with native iOS code.Install and set up CocoaPods by running the following commands:

    Note: The default version of Ruby requires sudo to install the CocoaPods gem. If you are using a Ruby Version manager, you may need to run without sudo.

  2. Follow the Xcode signing flow to provision your project:

    1. Open the default Xcode workspace in your project byrunning open ios/Runner.xcworkspace in a terminalwindow from your Flutter project directory.
    2. Select the device you intend to deploy to in the devicedrop-down menu next to the run button.
    3. Select the Runner project in the left navigation panel.
    4. In the Runner target settings page,make sure your Development Team is selected.The UI varies depending on your version of Xcode.
      • For Xcode 10, look under General > Signing > Team.
      • For Xcode 11 and newer, look underSigning & Capabilities > Team.

      When you select a team,Xcode creates and downloads a Development Certificate,registers your device with your account,and creates and downloads a provisioning profile (if needed).

      • To start your first iOS development project,you might need to sign intoXcode with your Apple ID. Development and testing is supported for any Apple ID.Enrolling in the Apple Developer Program is required todistribute your app to the App Store.For details about membership types,see Choosing a Membership.
      • The first time you use an attached physical device for iOSdevelopment, you need to trust both your Mac and theDevelopment Certificate on that device.Select Trust in the dialog prompt whenfirst connecting the iOS device to your Mac.

        Then, go to the Settings app on the iOS device,select General > Device Managementand trust your Certificate.For first time users, you may need to selectGeneral > Profiles > Device Management instead.

      • If automatic signing fails in Xcode, verify that the project'sGeneral > Identity > Bundle Identifier value is unique.

  3. Start your app by running flutter run Rdp viewer mac. or clicking the Run button in Xcode.

Android setup

Note: Flutter relies on a full installation of Android Studio to supply its Android platform dependencies. However, you can write your Flutter apps in a number of editors; a later step discusses that.

Install Android Studio

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard'.This installs the latest Android SDK, Android SDK Command-line Tools,and Android SDK Build-Tools, which are required by Flutterwhen developing for Android.

Set up your Android device

Visual Studio For Macbook Pro

To prepare to run and test your Flutter app on an Android device,you need an Android device running Android 4.1 (API level 16) or higher.

  1. Enable Developer options and USB debugging on your device.Detailed instructions are available in theAndroid documentation.
  2. Windows-only: Install the Google USBDriver.
  3. Using a USB cable, plug your phone into your computer. If prompted on yourdevice, authorize your computer to access your device.
  4. In the terminal, run the flutter devices command to verify thatFlutter recognizes your connected Android device. By default,Flutter uses the version of the Android SDK where your adbtool is based. If you want Flutter to use a different installationof the Android SDK, you must set the ANDROID_SDK_ROOT environmentvariable to that installation directory.

Set up the Android emulator

To prepare to run and test your Flutter app on the Android emulator,follow these steps:

  1. EnableVM accelerationon your machine.
  2. Launch Android Studio, click the AVD Managericon, and select Create Virtual Device…
    • In older versions of Android Studio, you should insteadlaunch Android Studio > Tools > Android > AVD Manager and selectCreate Virtual Device…. (The Android submenu is only presentwhen inside an Android project.)
    • If you do not have a project open, you can choose Configure > AVD Manager and select Create Virtual Device…
  3. Choose a device definition and select Next.
  4. Select one or more system images for the Android versions you wantto emulate, and select Next.An x86 or x86_64 image is recommended.
  5. Under Emulated Performance, select Hardware - GLES 2.0 to enablehardwareacceleration.
  6. Verify the AVD configuration is correct, and select Finish.

    For details on the above steps, see ManagingAVDs.

  7. In Android Virtual Device Manager, click Run in the toolbar.The emulator starts up and displays the default canvas for yourselected OS version and device.

Web setup

Visual Studio 2017 Mac Download

Flutter has early support for building web applications using thebeta channel of Flutter. To add support for web development, followthese instructions when you've completed the setup above.

Next step

Visual Studio For Macbook

Set up your preferred editor.





broken image