1
votes

When selecting a file, and going to its properties in an iOS project using Xamarin, there is no LinkDescription option under Build Action. I need this in order to do custom linking, as noted here: https://developer.xamarin.com/guides/cross-platform/advanced/custom_linking/

The Xamarin documentation on this page says "For iOS : set the Build Action to LinkDescription".

How do I select this build action if it isn't available as an option in Visual Studio?

2
Is your custom link file within your Xamarin.iOS app project and not an PCL/NetStd library project?SushiHangover
Yes, it's within the Xamarin.iOS project. No files within this project have the Build Action LinkDescription, but this option is available in my Xamarin.Android project.Magnetic Llama

2 Answers

3
votes

Yes, there is no LinkDescription build action.

Instead You can

  1. add LinkDescription.xml into your iOS project with build action "None"
  2. add following string into additional mtouch arguments in iOS project's properties.

--xml=${ProjectDir}/LinkDescription.xml

enter image description here

3
votes

There's one more way, Visual Studio on Windows does not have a way to set LinkDescription build action. You can simply add the following to your .csproj file:

<ItemGroup>
  <LinkDescription Include="YourLinkDescriptionFileName.xml" />
</ItemGroup>