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

SenthilkumarPosted Apr 14, 2012, 11:46 PM
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...
MementoPosted Apr 15, 2012, 1:55 AM
string sAppPath = Environment.CurrentDirectory - it works.
Sam HobbsPosted Apr 14, 2012, 3:45 PM
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.