1

I'm currently working on a simple add-in that is supposed to insert a copyright statement to a source file. It works fine but i would like the copyright text to live in a text file. This text file is being deployed to the same folder as the dll and .AddIn file.

But since the add-in could be installed in different folders on different machines the problem is now that I have not been able to figure out how to get the path to the text file programatically from the add-in code (c#). I've tried all kinds of reflection methods but non have worked so far.

If this is not possible or not the right approach please let me know what alternatives I have besides hardcoding the copyright text?

Thanks!

danca
  • 509
  • 4
  • 11

1 Answers1

1

If your text file is always in the same folder as the dll, then I think this related question should help you:

How do I get the path of the assembly the code is in?

Community
  • 1
  • 1
Jon Senchyna
  • 7,867
  • 2
  • 26
  • 46