I have a script that generates a .sln file and a few .vcproj files for visual studio 2005. I need to set the WorkingDirectory option but its specified in the .user file. A file we cannot currently generate. I found the vcproj file definition at msdn, but it seems that this option cant be set from there.
How does one specify "Configuration Properties->Debugging->Working Directory" from the .sln or .vcproj file?
In Visual Studio 2010: Go to the project properties (rigth click on the project name in the Solution Explorer, then Properties on the pop up menu). Then, under Configuration Properties / Debugging, set Working Directory to $(SolutionDir)$(Configuration)\ .
Open Project -> Properties -> Configuration Properties -> Debugging . The working directory entry is $(ProjectDir) by default.
After you change your settings, and close the sln you will get a user file named something like:
Project_Name.vcproj.Domain.user_name.user
Change it to:
Project_Name.vcproj.user
and commit.
The next person who checks out the code will use this user file to create their user specific one.
Change from my comment. I did find the property:
VCDebugSettings.WorkingDirectory
Use Visual Studio Extensibility to create an add-in or macro that calls this method. You should be able to hook into a BeforeCompile event or something to set it.
Not an easy answer, but doable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With