I am currently developing a Web Site (not a Web Application) in VS2008. I have a problem however with the way that TFS2008 handles the DLLs in the BIN directory. I do not want them being checked into TFS - this prevents other developers on the team from building the website as TFS will only allow checking them out exclusively. I have tried cloaking the directory in TFS (it still tries to check them out - adding them). You can not exclude the BIN directory via the Solution Explorer as it is a required directory for a web site.
我目前正在VS2008中开发一个Web站点(而不是Web应用程序)。我有一个问题,但TFS2008处理BIN目录中的DLL的方式。我不希望他们被检入TFS - 这可以防止团队中的其他开发人员构建网站,因为TFS只允许将其签出。我试过隐藏TFS中的目录(它仍然试图检查它们 - 添加它们)。您不能通过解决方案资源管理器排除BIN目录,因为它是网站的必需目录。
So how should I go about setting the configuration to handle this?
那么我应该如何设置配置来处理这个呢?
Put all shared assemblies into a "lib" directory under your main "trunk" folder and reference them into your Web Site from "lib". In this case TFS will not check-in the assemblies into the "bin" folder of your web site but it will only add a text file which has the same name as your assembly and with the ".refresh" extension (for example MyAssembly.dll.refresh) which contains a single line pointing to the location of the real assembly.
将所有共享程序集放入主“trunk”文件夹下的“lib”目录中,并从“lib”引用它们到您的Web站点。在这种情况下,TFS不会将程序集签入到您网站的“bin”文件夹中,但它只会添加一个与您的程序集同名并带有“.refresh”扩展名的文本文件(例如MyAssembly。 dll.refresh)包含指向实际程序集位置的单行。
Then when you right-click on the Solution and click on Check-In it will not select the assemblies in the "bin" folder and they will not be locked. Although if you click on Check-In from the Team Explorer it will automatically check the assemblies so you have to be careful.
然后,当您右键单击解决方案并单击“签入”时,它将不会选择“bin”文件夹中的程序集,并且它们不会被锁定。虽然如果您从团队资源管理器中单击“签入”,它将自动检查程序集,因此您必须小心。
One of the reasons we migrated from Web Site to a Web Application was because it was a real PITA to handle this type of projects with TFS.
我们从Web站点迁移到Web应用程序的原因之一是因为它是使用TFS处理此类项目的真正PITA。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2009/07/21/5f46ab6fdd559f410e25c4508847d2f1.html。