Reference to type 'Assembly' claims it is defined in 'System.Runtime', but it could not be found

≡放荡痞女 提交于 2019-11-30 19:00:43

This happened to me recently. It was from creating an Xamarin application with PCL and changing the target from .NET standard 2.0 to .NET Standard 1.4. After downgrading the Xamarin.Forms from version 3.0.0.446417 to version 2.5.1.527436 in all the projects, it compiled without errors.

Explanation (per request): If you are Targeting before Fall Creators Update (version 6.332), you will need to remove all references to .NET Standard 2.0.

Xamarin Forms 3.x uses .NET standard 2.0. Since you are targeting below Fall Creators Update (version 6.332) the PCL will need to be .NET Standard 1.x.

More information here.

I had the same problem with Xamarin Forms 3.0.0.446417 being installed. I just went back to the previous version, 2.5.1.527436, but then my Android project fails with "The target "CssG" does not exist in the project."

It appears to be a problem with that version of Xamarin Forms.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!