I have an ASP.NET website and I want to find the /bin/[Configuration] folder to use an external tool (an exe file). When I use reflection to get calling assemblies location it returns something similar to:
C:\Windows\Microsoft.NET\Framework\\...\Temporary ASP.NET Files\a1388a5e\\...\my.dll
Since each dll has its own directory under the temp ASP.NET Files this fails for me.
How can I get the location of the compiled binary folder where the dll's and the .exe is (i.e. bin/) instead of asp.net's temporary cache?
Notes
- This code is in a supporting library that can be called from ASP.NET websites or other console/windows apps.