更新时间:2023-11-22 19:15:40
为什么您的服务代码关注它来自的项目路径??这不应该是因为,当它在生产中时,项目将不在那里。
IIRC,它将是Assembly.GetExecutingAssembly ().Location
。然后你只需使用Path
类中的方法从那里获得你想要的路径。
Why is your service code concerned about the path of the project it came from?? It shouldn't be because, when it's in production, the project won't be there.
IIRC, it would beAssembly.GetExecutingAssembly().Location
. Then you just use the methods in thePath
class to get the path you want from there.