Environment.CurrentDirectory is yielding unexpected results when running installed app

前端 未结 5 1927
既然无缘
既然无缘 2020-12-06 10:49

Background:

I built an installer for my app, and all my dll\'s and content files are getting correctly copied to the C:\\Program Files\\MyComp

5条回答
  •  温柔的废话
    2020-12-06 11:17

    The Environment.CurrentDirectory contains current directory that is really current directory now. The value depends on many factors. Any application may change the value. This value doesn't concerned with your application only.

    If you want to get the start up directory then use Application.StartupPath.

提交回复
热议问题