Visual Studio For Mac Wont Start
Microsoft launched Visual Studio 2017 in March 2017 and Visual Studio 2017 for Mac in May 2017 and then released seven subsequent updates to further improve their performance.
Since I’ve recently started using Xamarin for cross platform development, I thought it would be nice to share with the community how I’ve got past some of the issues which tripped me up for a while when I was becoming familiar with it. Vlc for mac doesn't work. This isn’t really a normal “getting started with Xamarin” tutorial – there’s lots of them already out there already, – but hopefully anyone starting off with Xamarin will find it useful. I use Windows 10 (and have installed the Creator’s Update) – this allows me to use.
You’ll know if you’re on the Creator’s Update version if your Windows build number is 1703. If you’re on a different version of Windows, you might have different experiences to me (you can check your version by going to Windows Settings -> System -> About). Before we begin – what’s Xamarin and why should I use it? With tools built into Visual Studio, developers can create native applications in C# for Windows, Mac and Linux devices. So instead of writing and managing three different codebases for three different platforms, developers can just write their code once and deploy it to different app-stores. Installing Xamarin tools for Visual Studio 2017 With Visual Studio 2017, it’s very easy just open up the setup wizard, select the Xamarin tools (as shown below) and just wait for it to install.
It’s probably going to take a long time to install VS2017 with Xamarin – adding Xamarin to the base Visual Studio install makes it about 25GB bigger. Tip: If you leave your machine to download and install Xamarin, it’s worth adjusting your power settings to make sure an unattended machine doesn’t switch off in the middle of the download – like mine did the first time ( facepalm). Creating a project with the default Xamarin template This bit is straightforward to anyone who’s created a new project in Visual Studio 2017 before. Select File -> New Project to open the dialog below, and choose a name for the project: After clicking OK on the dialog above (which chooses a Cross Platform App project type), the dialog will close and open a new project.
I chose to use Xamarin.Forms (which allows developers to create ). I also chose to create a because I only expect my code to be used in my application, rather than shared with other developers as a (you can read more about the differences between Shared Projects and Portable Class Libraries ). When you click OK, the project and files will be created, and a window like the one below will appear with instructions for setting up the Mac Agent. (I don’t have a Mac and I’d need Visual Studio Enterprise to use this anyway, so I normally click on the “Don’t show this again” box in the bottom left corner). Finally you’ll be prompted for the versions of Windows that you want the UWP flavour of your project to target. I normally just click OK here. Movavi screen capture studio for mac download. At this point, you’ll have a simple Xamarin solution in Visual Studio 2017, which contains 4 projects – one for iOS, one for Android, one for UWP, and one shared project.
Also notice that there is one file open in VS2017 after you create the solution – App.xaml.cs in the shared project. I’ll explain why this is relevant later. And now for the gremlins ex machina After this point, I hit a few snags. Things I wanted to do that didn’t work out of the box for me were: • Compile the application without error or warnings • Run the application in a Windows Phone Emulator • Run the application in an Android Emulator I’ll run through some of the symptoms of problems I encountered trying the things above, and how I fixed them. Compiling the solution led to multiple warnings and errors Tip: Prepare to wait a while when building the solution for the first time – it needs to download a lot of NuGet packages. Unfortunately my attempt to compile the project out of the box showed an error in the UWP project and a bunch of warning messages for the Android project.
Getting rid of the error CS0103 – ‘InitializeComponent’ does not exist in the current context The error reports “ The name ‘InitializeComponent’ does not exist in the current context.” I eventually noticed a couple of things that seemed a bit bizarre: • Even though I have an error, the message in the status bar in the bottom left reports “Rebuild All succeeded” – both can’t be right surely? • This error relates to the App.xaml.cs file which is open in the editor panel. When I opened Main.xaml.cs from the Shared Project in the VS2017 editor, I now see two errors (as shown in the image below). So these errors don’t seem to negatively affect the build, and if I really want to get rid of them, I can just close those files which gets rid of the errors (as shown below). Getting rid of warnings about $(TargetFrameworkVersion) mismatches Three of the warnings I saw were very similar: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project. The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0).