I have ProjectA referenced by ProjectB in my solution. I'm trying to get a "path" of ProjectA, when running ProjectB.
I've tried this:
Running in ProjectB
// HomeController is in ProjectA
// This code is executed from ProjectB
var assembly = typeof(HomeController ).Assembly;
string filePath = new Uri(assembly.CodeBase).LocalPath;
To get location of referenced assembly use this