I've got an MVC web-project that's referencing a class-library-project that contains my Domain and Persistence tiers. I'm using nHibernate for my OR/M. Since I've got multiple databases to connect to, I'm initializing my session-factories by specifying the file-names:
var config = new Configuration().Configure(nHibernateCfgFileName)
THE ISSUE: When I try to debug my MVC project, I get an error saying that it's not able to find the nHibernate config files (the files are configured to "Copy Always" to output directories). I've tried:
var x = Assembly.GetExecutingAssembly().Location;
var y = Assembly.GetEntryAssembly().Location;
var z = Assembly.GetCallingAssembly().Location;
But all of the above return back "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files....", and I've verified that the config files are not copied over into those temp locations (but they are in the bin\Debug location). Can someone please help me get to my config files?