Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Get root path of project

$
0
0

How to get root path of current working project in Xamarin.Android or Xamarin.Forms project? Forms project is PCL, hence I am trying out in Xamarin.Android project. Tried following things:

string rootPath = AppDomain.CurrentDomain.RelativeSearchPath;
string rootPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
string rootPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
string rootPath = System.Environment.CurrentDirectory;
string rootPath = System.IO.Directory.GetCurrentDirectory();

Everything is returning null. I want to dynamically create file in particular folder, for that I need root path of my project. How to get it?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>