Xamarin Forms Project In Visual Studio For Mac

Active2 years, 1 month ago
  1. Xamarin Visual Studio 2015 Download
  2. Visual Studio For Mac Download
  3. Xamarin Forms Visual Studio 2017

I am fully aware similar questions have been asked (and answered) However, nothing has worked for my particular case. The issue occurs in Visual Studio for Mac when trying to create a new Xamarin Forms Blank project. As soon as the project is created there are already errors:

Xamarin Visual Studio 2015 Download

Next, you'll need to create a new Visual Studio Mac extension that is an SDK style project and references the NuGet MonoDevelop.Addins v0.4.4. I've found that the Xamarin.Forms bootstrapping process does not work in Visual Studio Mac extensions that are not SDK style projects.

Could not install package 'Xamarin.Android.Support.v4 23.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v2.3', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Visual studio
  • Visual Studio for Mac supports building.NET Core 2.0 applications, including libraries, console apps, as well as web applications and services with ASP.NET Core. Note that the.NET Core 2.0 SDK needs to be installed via a separate download to enable.NET Core 2.0 development in Visual Studio 2017 for Mac Version 7.1.
  • Create a New Xamarin.Forms Project. In Visual Studio, choose File - New Project, pick the Cross-Platform category, and choose the Cross-Platform App (Xamarin.Forms) template. Name the project HelloWorldApp. Then, pick the Blank App template and the platforms you want to build the app for.

From the solutions I have read, people have said I must have the same Target Android/API and Target Framework version. Ive tried with several versions of android, however VS wont allow me to edit the Target Framework:

Ive so I set the Target Android version to be Android 7.1 (API 25)

Also it seems that the packages folder under the Xamarin Droid project is empty, so i try to install the NuGet packages needed

Xamarin.Android.Support.v7.AppCompat

And the same errors occur. This is frustrating because I cant even start to develop or test my code immediately out of the box Xamarin/VS has issues.

If anybody knows how to help, please be very specific, everything else online has been very vague, 'need to update Xamarin.Forms' or something without much detail or procedural explanation. I know many many others are having similar issues with VS/Xamarin on MacOS. Here is my package structure:

Thanks in advance.

mksmks

3 Answers

I was struggling with this too.

The root cause was that I had no Android SDK accessible to my user, so there was no target platform to choose and no nuget packages were installed.

I ended up doing the following:

  • Install Android Studio with all the defaults and install a few Android SDK levels with the Android Studio SDK manager.
  • Get the SDK path from Android Studio and paste it into the Preferences/SDK Locations in Visual Studio.
  • Restart Visual Studio and create a new project - it will install some nuget packages this time.
  • Open the options for the Android project and choose suitable minimum and target Android versions under Android Application.

The project should build now.

Nigel FerrisseyNigel Ferrissey

When you install Visual Studio for Mac, there is a step to check to install Android SDK. You can check whether Android SDK is install or not in Visual Studio->Preferences->SDK Locations->Android

The step to install Android SDK is here. You need to select Android then check the Android SDK on the right side. Yes, its weird that it is not selected by default =.=:

Details guide of the installation can be refer https://lowleetak.wordpress.com/2017/07/01/xamarin-installation-in-mac/

lowleetaklowleetak
1,2371 gold badge6 silver badges18 bronze badges

Apparently this is a known bug with VS for Mac:https://forums.xamarin.com/discussion/96085/could-not-add-packages

mksmks

Not the answer you're looking for? Browse other questions tagged androidmacosvisual-studioxamarinandroid-appcompat or ask your own question.

Please complete the security check to access this website.

Visual Studio For Mac Download

Why do I have to complete a CAPTCHA?

Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.

What can I do to prevent this?

If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.

Xamarin Forms Visual Studio 2017

If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.