Search code examples
.netxamarinxamarin.forms.net-framework-version

How to change the Targeted Framework of Xamarin Project to 4.0


I need to change targeted framework to 4.0 in my Xamarin Project. I have installed the 4.0 .net framewrok also, but still i cannot change to 4.0. I have tried the same with a C# project, there i can change the targeted framework to 4.0. I am using Visual Studio 2017 Community edition.

Thanks in advance.

Targeted Framework

Visual Studio Installer


Solution

  • tl;dr: There's nothing wrong with your Xamarin project.

    It looks like you're confusing .NET Framework with .NET Standard. They have very similar names and it's a common mistake.

    .NET Framework isn't used for Xamarin apps; it is used for apps running on windows like WPF, WinForms and ASP.NET.

    Your Targeted Framework screenshot shows your .NET Standard project, and the highest API for .NET Standard (also known as netstandard) is currently 2.0. Set it to 2.0 and you're good to go!

    Here's some more information about the difference between .NET Standard and .NET Framework: https://msdn.microsoft.com/magazine/mt842506.aspx.