Xamarin.Forms and WPF .net framework

CaseCase USMember ✭✭✭

I'm trying to build a Xamarin.Forms application that runs on Windows 10 Original (build 10240).
As far as I can tell, my options are to target .NetFramework 4.6.2 (a WPF project) or Uap.10.0.10240 (a UWP project).

I first tried a netstandard 1.4 forms project and a UWP project targeting Uap.10.0.10240, but one of the nuget packages I use doesn't support that uap framework.

So I created a project with a netstandard 1.4 forms project and a WPF .netFramework 4.6.2 project.

I get the build error:

xamarin.forms\3.2.0.809874-pre3\build\netstandard2.0\Xamarin.Forms.targets(46,3): error XF004: XF requires .NETFramework >= v4.7. You have 'v4.6.1'

Does this mean that I must target 4.7? If so, then why does the Package Dependency for Xamarin.Forms.Platform.WPF say .NETFramework, Version=4.5

I mean, Xamarin.Forms.Platform.WPF is only available with Xamarin.Forms > 3.0.0.44617

Also, this implies that I can only build a .Net application that runs on Windows 10 Fall Creators update and later, so the only option to deploy an application that runs on Windows 10 Original (build 10240) is to build against uap.10.0.10240

Any advice would be appreciated.
Thanks!

Tagged:

Best Answer

  • CaseCase US ✭✭✭
    Accepted Answer

    I need to target 4.6.1 because you can't install 4.7 on Windows 10 build 10240, and that's the machine I need the application to support.

    The solution was to use Xamarin.Forms 3.1.0.583944 and Xamarin.Forms.Platform.WPF 3.1.0.583944

Answers

  • CaseCase USMember ✭✭✭

    So I found that Xamarin.Forms 3.1.0.583944 and earlier work fine, and I can run a test app using .net 4.6.1 on an older Windows 10 machine.

    When using Xamarin.Forms 3.1.0.637273 or later, I get the build error:

    XF requires .NETFramework >= v4.7. You have 'v4.6.1'
    
  • LandLuLandLu Member, Xamarin Team Xamurai

    Change your WPF project's target Framework to 4.7:

    If you didn't download this sdk, try to modify that. You can refer to this thread: https://forums.xamarin.com/discussion/131914/error-xf-requires-netframework-v4-7-you-have-v4-6-1

  • CaseCase USMember ✭✭✭
    Accepted Answer

    I need to target 4.6.1 because you can't install 4.7 on Windows 10 build 10240, and that's the machine I need the application to support.

    The solution was to use Xamarin.Forms 3.1.0.583944 and Xamarin.Forms.Platform.WPF 3.1.0.583944

Sign In or Register to comment.