mimic
mimic

Reputation: 5224

How to determine the folder where extension is executed from?

I'm writing some extension and I need to pull out data from the file that is included into vsix. But if I'll use Environment.CurrentDirectory I will not have this file because this folder points to VS folder not on the extension's one. How can I define it in a run-time?

Upvotes: 0

Views: 116

Answers (1)

mimic
mimic

Reputation: 5224

System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase get the path to the executing dll.

Upvotes: 1

Related Questions