In MsBuild it is possible to create a build.proj.user
file which is parsed by the Microsoft.Common.Targets
build file.
I want to have a similar system in place where it is possible to have a .user file in the root of the folder and make msbuild pick up the config settings from this file.
Take for example these paths:
c:\working\build.proj.user
c:\working\solution1\build.proj.user
c:\working\solution1\project1\
c:\working\solution1\project2\
c:\working\solution1\project3\build.proj.user
c:\working\solution2\
c:\working\solution2\project1\
c:\working\solution2\project2\
I want to achieve that for solution1/project1 the file c:\working\solution1\build.proj.user
is read and for solution2/project1 the file c:\working\build.proj.user
The purpose is to allow integration test connectionstring properties to be customized per solution and or project.
The current solutions I see are:
- Make a custom msbuild task which will go look for this file
- Construct a shell command to find the file.
- Have it hard-coded look in the parent and parent of parent path
I am not a fan of either solution and wonder if there isn't a more elegant way of achieving my goal (with msbuild).