I have an ASP.NET project I'm currently working on. There is a C# file (dbedit.cs) that is used to directly access and edit 2 XML database files. How can I create a relative path of the XML files (both in the same directory) to dbedit.cs? It needs to be portable so it can't be hard-coded in. dbedit.cs is also accessed from two other projects that are in the same solution, so the assembly path of dbedit.cs is different depending on which project is accessing it.
This doesn't work for that reason:
(new System.Uri(Path.GetDirectoryName(Assembly.GetAssembly(typeof(dbedit)).CodeBase))).LocalPath;
Any help would be greatly appreciated.