How to get Current Project Directory path using C#

后端 未结 9 777
旧巷少年郎
旧巷少年郎 2020-12-31 08:19

okay, here is the question. I have two projects one is C# Console and other is Class library. I am accessing/calling Class library method from the console app. There is a fo

9条回答
  •  礼貌的吻别
    2020-12-31 08:41

    I would recommend one of two options.

    1. If the files are small include them in the class library and stream them to a temp location when needed

    2. Other option is to copy the files during the build to the output directory and use them that way. In cases of multiple shared projects it is best to have a common bin folder that you copy assemblies to and run from that location.

提交回复
热议问题