简体   繁体   中英

Is there a way to configure TFS to allow inclusion of only specific extensions for a folder?

Is there a way using TFS (Microsoft Team Foundation Server) to configure a folder for a project so that it allow the adding of files with just a specific extension to a project?

The scenario is:

  • I have a project with a standard folder structure for cs files, binaries and so on
  • In a folder there are the SQL script used to build the database
  • I want to be sure that, only in that folder, only SQL files could be checked in and different extensions are not allowed

Regards Massimo

Not really. The closest you can come is by writing a custom checkin policy. This has some downsides:

  • Developers can override policies. (though you can be notified / audited)
  • Checkin policies must be installed on each client machine that uses the team project. No automatic deployment; no exceptions for folks who don't access the SQL folder.

I guess you could also poll the server periodically to see whether anyone's checked in unwanted files. Or you could restrict Checkin permission on that folder to database developers. But obviously none of these is perfect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM