Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to access file within project (packaged class lib) in ASP.NET 5

$
0
0

Hi,

I have 2 projects:

  • Poc.App (MVC6)
  • Poc.Lib (ASP.NET 5 class lib package)
  • App references Lib.
  • data.xls is in Lib
  • I have a class DataProvider with method GetData in Lib, how do I load/get path to data.xls in the GetData method which is in de Lib package?

I can't use the approot of the MVC app I think because I need the file in my common lib, in earlier versions of ASP.NET I could just refer to the current directory and add the folder (when needed)  + filename to reach the file.

How to do it now? Even when checking the 'Buid output' box in my MVC app build settings, I still don't see my data.xls anywhere on disk.

Thanks!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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