1

Already found the same problem here.

My error:

Severity Code Description Project File Line Suppression State Error CS7069 Reference to type 'Assembly' claims it is defined in 'System.Runtime', but it could not be found

The solution on that thread is downgrade the xamarin forms to version 2.5.1.527436 in all the projects. But I can't do that in my project, because I am using some features that are available in latest xamarin forms like android bottom tab feature, autosize property of editor and flowdirection property of listview.

I have this problem after updating xamarin forms to 3.4.0.1008975 from 2.5.0.121934. Problem is only on the UWP part. Android and IOS apps are working fine.

Error lines:

var rendererAssemblies = new List<Assembly>
   {
       typeof(ImageCircleRenderer).GetTypeInfo().Assembly
   };
rendererAssemblies.AddRange(Rg.Plugins.Popup.Popup.GetExtraAssemblies());
Rg.Plugins.Popup.Popup.Init();
Xamarin.Forms.Forms.Init(e, rendererAssemblies);

So how can I fix this issue without downgrading Xamarin.Forms?

Update

Facing the same problem again for another project. But the solution here is not fixing the error. Changed the target version of windows project to windows 10, version 1809(10.0;Build 17763) and min version to Windows 10 Fall Creators Update(10.0; Build 16299). Screenshot adding below: please suggest a solution.

Xamarin.Forms Version: 3.4.0.1008975

enter image description here

Sreejith Sree
  • 3,055
  • 4
  • 36
  • 105

1 Answers1

2

As the linked thread mentions, the problem is that your app has to have min UWP version set to Fall Creators Update (16299), because this is the first release that supports .NET Standard 2.0.

In version 3.0 Xamarin.Forms dropped support for Portable Class Libraries and is now targeting .NET Standard 2.0 only. This means you must target at least Fall Creators Update (16299) in UWP to make sure it can be referenced.

To retarget your UWP project to the newer version, right-click the UWP project node in Solution Explorer, select Properties and then use the two dropdowns to select at least version 16299 in both.

Version selection

Changing the Min version should be okay as long as you don't need to support Windows 10 Mobile, because absolute majority of users is already on version 1803 and Fall Creators Update is version 1709. See following usage graph (by AdDuplex)

AdDuplex stats

Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
  • I changed both versions to Fall Creators Update (16299) and the problem solved now, thank you very much. – Sreejith Sree Dec 11 '18 at 04:50
  • 2
    Actually I would recommend setting the Target version to the latest available release and keeping Min version at FCU. The advantage is that latest SDK gives you access to the latest features, which you can use by utilizing conditional code – Martin Zikmund Dec 11 '18 at 07:20
  • Added screenshot of current target version options available in the question, How to know which one is the latest available release? – Sreejith Sree Dec 11 '18 at 09:54
  • Is version 1809 latest? – Sreejith Sree Dec 11 '18 at 09:55
  • 1
    Yes it is :-) . Although the versioning is quite confusing, the rule of thumb is the version number format is YYMM where YY is year and MM month of release. Also you can use the build version number in the parentheses which simply follows the rule "the bigger the newer" :-) – Martin Zikmund Dec 11 '18 at 10:05
  • Hi Again facing the same problem, but the solution is not working. I have edited the question with details, can you please have a look at the question? – Sreejith Sree Jul 09 '19 at 08:06