Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specify the referenced multitarget project's platform?

If I have a multi target (netstandard16 and PCL Profile44) project (new SDK style csproj) and I reference this in a Xamarin.iOS/Android project as project reference, how can I specify the referenced platform?

The Xamarin project pulls netstandard but I want to use the PCL in this case.

like image 424
Tóth Tibor Avatar asked Jan 21 '26 15:01

Tóth Tibor


2 Answers

You can overwrite the target framework in the project references using:

<ProjectReference Include="../other/other.csproj" AdditionalProperties="TargetFramework=your-pcl-TFM" />
like image 169
Martin Ullrich Avatar answered Jan 23 '26 04:01

Martin Ullrich


You can't and NuGet won't either. Netstandard wins over legacy PCL, always. Why do you want the reverse?

like image 33
Claire Novotny Avatar answered Jan 23 '26 03:01

Claire Novotny