Hi,
I'm trying to do something simple, which I just can't get to work...
In my .csproj file, I have the following:
<Choose>
<When Condition=" $(AUTHENTICATION_USERNAME) != '' And $(AUTHENTICATION_PASSWORD) != '' ">
<PropertyGroup>
<ConnectionParams>-U $(AUTHENTICATION_USERNAME) -P $(AUTHENTICATION_PASSWORD)</ConnectionParams>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ConnectionParams>-E</ConnectionParams>
</PropertyGroup>
</Otherwise>
</Choose>
The idea being that if the USERNAME and PASSWORD properties are set, then it uses one format, otherwise it uses the sqlcmd -E param (for trusted connections). The -E string would be used on desktop builds where each dev has their own DB, but the -U/-P format needs to be used by the TeamBuild system
I've tried setting these properties in my TFSBuild.proj, but they do NOT get passed to the project file when it is built. I've tried setting the properties as environment variables for the tfsservice user on the build machine, but the properties _still_ do not get passed into the csproj...
How can this be done What is best practice
Pete

Overriding a custom property in csproj from tfsbuild.proj
Peter Bernhardt
Did you set AUTHENTICATION_USERNAME and AUTHENTICATION_PASSWORD as environment variables (doc reference: http://msdn2.microsoft.com/en-us/library/ms171459.aspx)
After setting the environment variables for that account, you would likely need to restart the build service for it to pick up the new environment variable settings.
Buck