26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4. Ensure that the User.config file is deployed along <strong>with</strong> the application code. To do so,<br />

in Solution Explorer, right-click the User.config file, click Properties, and then in the<br />

Properties pane, set the Copy To Output Directory property to Copy if newer.<br />

Do not add the User.config file to source control. By not doing so, each developer<br />

(and the test team) can explicitly specify the connection string through his or her own<br />

User.config file. Source control might contain other User.config files; for example,<br />

for testing and production. These files should be managed by the users responsible for<br />

managing the testing and production environments. These test and production<br />

User.config files should not be stored as part of the database projects but should be<br />

stored in different areas of the source control system.<br />

In source control you should have a User.config file for each of the environments that<br />

you use, such as production and test. These configuration files should specify the<br />

connection string for the database. The User.config file must be present for the<br />

configuration system to work.<br />

Tip: By default, the user configuration file is automatically added to source control when<br />

you add the solution. To prevent this, when you first check in the files, clear the<br />

User.config file check box. You can then right-click the file in Solution Explorer and<br />

select Under Pending Changes to ensure that the file never comes under source control.<br />

It is important to understand that the User.config file must be present if you are using this<br />

mechanism. Some team member will need to be responsible for ensuring that the<br />

environment is correct when creating builds for production releases and for any test<br />

environments. As part of this build step, the appropriate User.confg file will need to be<br />

retrieved from the source control system and copied into the correct location in order for<br />

MSBuild to be able to find it.<br />

Additional Resources<br />

• For more information about using a configuration file to define a data source, see<br />

“Walkthrough: Using a Configuration File to Define a Data Source” at<br />

http://msdn2.microsoft.com/en-us/library/ms243192(VS.80).aspx<br />

• For more information about the configSource attribute, see<br />

“SectionInformation.ConfigSource Property” at http://msdn2.microsoft.com/enus/library/system.configuration.sectioninformation.configsource.aspx<br />

Distributed/Remote <strong>Development</strong><br />

• How to access TFS over the Internet<br />

• How to optimize TFS Version Control proxy performance<br />

How to Access TFS over the Internet<br />

You can choose from one of the following three solutions to provide access to TFS over<br />

the Internet:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!