Usings Settings in the SettingsFileGenerator in BTDFPROJ file

Topics: Bindings File, Settings Management and SSO, General Questions
Mar 17, 2011 at 4:40 PM

Hello,

I was wondering if there is any way to use the settings that are generated by the SettingsFileGenerator in the BTDFPROJ like the PortBindingMaster. I have a file that I have included and depending on where it’s getting deployed to the physical path where it needs to be copied will change.

I would want to do something like below where DestDir is an item in the SettingsFile.

<Copy SourceFiles="..\blah.xml" DestinationFolder="${DestDir}/Tsx" />

The work around that I am thinking of is to add a condition to see if the path exists and if so copy the file over.

Thanks,

Brad

Coordinator
Mar 17, 2011 at 7:45 PM

Hi Brad,

Yes you can.  The syntax is $(DestDir) [an MSBuild property reference] instead of ${DestDir}.  Create the setting name and values in the spreadsheet -- in this case the setting name would be DestDir.  You probably already have an ItemGroup in your .btdfproj containing one or more PropsFromEnvSettings elements.  You can either create another PropsFromEnvSettings element in the same ItemGroup with Include="DestDir", or simply add ";DestDir" to the end of the existing value in Include.

That will cause an MSBuild property to be created that contains the value of the setting for the selected environment.  Then you can just reference it as above [$(DestDir) or whatever you call the setting].

Thanks,
Tom