[英]changing xamarin forms pcl targets
I have a xamarin forms PCL solution and now I want to add xamarin forms pcl class libraries but I am unable to add these libraries as references to my original PCL project seeing. 我有一个xamarin表单PCL解决方案,现在我想添加xamarin表单pcl类库,但是我无法添加这些库作为对原始PCL项目的参考。 It gives me the following error:
它给了我以下错误:
Unable to add reference to project.
无法添加对项目的引用。 The targets of Portable Library project are not the same or compatible with the targets of the current Portable Library project.
可移植库项目的目标与当前可移植库项目的目标不同或不兼容。
I have tried to change the targets on the PCL projects so that they match up but I can't do it in Visual Studio 2017. 我试图更改PCL项目上的目标,以便它们匹配,但是我无法在Visual Studio 2017中做到这一点。
Below are the targets for the original PCL project. 以下是原始PCL项目的目标。
Below are the targets for the project I want to reference in the original PCL project. 以下是我要在原始PCL项目中引用的项目的目标。
Can anyone please assist or advice on how to accomplish this? 任何人都可以协助或建议如何实现这一目标?
I found the solution to my problem. 我找到了解决我问题的方法。 Its a slight change to @user2297037's answer.
与@ user2297037的答案稍有不同。 I did have to change the profile in the project file.
我确实必须在项目文件中更改配置文件。 The initial Portable Class Library's profile was Profile259 and the two new Portable Class Libraries' was Profile111.
最初的可移植类库的配置文件是Profile259,而两个新的可移植类库的配置文件是Profile111。 Changing the initial Portable Class Library's profile seemed to work but created massive problems at build time.
更改最初的可移植类库的配置文件似乎是可行的,但在构建时会产生大量问题。 I then reverted the change to the initial Portable Class Library and then changed the Profile on the two new Portable Class Libraries from Profile111 to Profile259.
然后,我将更改还原到初始的可移植类库,然后将两个新的可移植类库上的配置文件从Profile111更改为Profile259。 This solved my problem.
这解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.