Share via

Deploy file during Xamarin deploy

Lloyd Sheen 1,491 Reputation points
2022-01-27T15:07:35.907+00:00

Is there a way to have a file (.json) which exists on my development PC copied to the app storage on my Android?

Developer technologies | .NET | Xamarin

1 answer

Sort by: Most helpful
  1. Lloyd Sheen 1,491 Reputation points
    2022-01-28T16:03:39.28+00:00

    No mention of emulator which I have never been able to use. But that said I found the solution.

    Add file to Assets in the Android sub project. Make the Build Action - AndroidAsset.

    Once this is done the deploy will copy the file to the phone and make it available to read.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.