Reputation: 2564
I'm making a nuget library that reads from file. I would like to, by default read the file from:
I don't want to depend on any System.Web.* because requiring System.Web in windows application would be, at least, strange.
Upvotes: 0
Views: 284
Reputation: 12618
AppDomain.CurrentDomain.BaseDirectory
is what you looking for. Documentation here: https://msdn.microsoft.com/en-us/library/system.appdomain.basedirectory%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
Upvotes: 1