Finding current directory during Visual Studio debugging session?

前端 未结 3 1835
太阳男子
太阳男子 2020-12-17 10:23

How can I find the current directory for a .NET application running under the Visual Studio debugger?

Update 1. To be clear: I don\'t want to change

3条回答
  •  余生分开走
    2020-12-17 10:37

    Within your code, call the function

    System.IO.Directory.GetCurrentDirectory()
    

    By default, unless you've changed the Debug properties of your project, the current directory will start as the bin\Debug directory of your project (where the .exe runs from).

提交回复
热议问题