Inside a given Orchard module, how to determine the path to the physical directory where that module is installed?
In alternative, how to programatically determine the Module’s name?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can retrieve the module name twofold:
second question is here and here. This is the better way.
Or use reflection and get the name from the currently executing assembly, which is named like your module:
Assembly.GetExecutingAssembly().GetName().NameIf you have the name, getting the physical directory is as easy as writing: