views:

19

answers:

2

I am using a standard operating environment which involves Visual Studio 2005 running on Windows XP.

The source for the solution is managed in Linux, but edited and compiled using Visual Studio on a Windows computer via a network share.

The problem I am facing is that if I change the output directory of certain projects of my solution, Visual Studio automatically creates the directories but they are always in lowercase. The output files have the correct case, only the directories are in lowercase.

This is causing problems for the source management tools that are used in Linux which are picky about case.

Is there any way to get Visual Studio 2005 to create directories in the right case? I have considered using a pre-build script that calls mkdir, since I've found this works, but it seems cumbersome to have to insert pre-build scripts for each affected project.

I have also considered that perhaps it is the network layer that is causing the problems, but if I temporarily set output directories to the local hard drive the same thing happens.


To update, there are actually two variables here, $(TargetDir), which is essentially just a lowercase version of $(OutDir) or $(OutputDir) depending on the build stage. I just can't seem to find out how to change it, or where it comes from.

+1  A: 

According to this article, this is a bug, but there is a workaround pointed out in the article by Microsoft. The article is from 2005, so I am not sure if it is still a bug.

Xaisoft
That looks like the same bug but unfortunately the workaround is not feasible; the workaround looks specific to Windows Installer components.
dreamlax
I have no knowledge of this but cant you rename the dir after creating it with the right uppercase?
Grumpy
@Grumpy: I can, but each time I do a clean and a re-build, the directory appears in lowercase again.
dreamlax
A: 

I fixed this just by resorting to using mkdir in a pre-build step. For each project where the case of the directory is important, I have the following pre-build step:

if not exist "$(OutputDir)" mkdir "$(OutputDir)"

The conditional is required because mkdir returns non-zero if the directory already exists, and this stops the build.

dreamlax