Very often i move my project from my home to job comp.
Every time i must adjust mu path string variables (to load files), although my project folder is allways the same.
Is there a way to tell something like:
string path = myProjectFolderPath.ToString(); ?
Loading


SenthilkumarRank #387 · 6.5K reputationPosted Apr 14, 2012, 7:46 PM EDT
I am not sure what you are looking for...
If you want to get the current path of your application then try this.
Hope this will help you...
Sam HobbsRank #107 · 20.5K reputationPosted Apr 14, 2012, 11:45 AM EDT
You can use "Tools | External Tools..." to add tools to the Tools menu. You can write a script using JavaScript or VBScript. You can put Macros for Build Commands and Properties in the Arguments for external tools, so you can pass a macro such as $(ProjectDir) to pass various parameters to the script or other command. You could even write a C# program to be used as an external command.
You might be able to access solutions and projects from external commands. If you neeed to access solutions and/or projects then you might need to use a Visual Studio macro. You can probably do everything you need to do using a Visual Studio macro but I do not know how to access parameters such as the project directory from them.
Memento104 reputationPosted Apr 14, 2012, 9:55 PM EDT
string sAppPath = Environment.CurrentDirectory - it works.