简体   繁体   English

使用TFS 2010构建WCF项目时遇到的问题

[英]Problems Building a WCF Project with TFS 2010

I have a WCF project with a single .svc file and some .config files in it. 我有一个WCF项目,其中包含一个.svc文件和一些.config文件。 I'm trying to create a build definition in TFS 2010 that will copy these files to an IIS folder on another machine. 我正在尝试在TFS 2010中创建一个生成定义,该定义会将这些文件复制到另一台计算机上的IIS文件夹中。

I've done similar things with other MVC projects using the CopyDirectory task in the build XAML template. 我已经使用构建XAML模板中的CopyDirectory任务对其他MVC项目进行了类似的操作。 In those, I copy from the _PublishedWebsites folder to the IIS folder. 在这些文件中,我从_PublishedWebsites文件夹复制到IIS文件夹。 However, with the WCF project, there is no _PublishedWebsites folder. 但是,对于WCF项目,没有_PublishedWebsites文件夹。

So I tried updating the MSBuild script for the WCF project to create a _PublishedWebsites folder and copy the files to it. 因此,我尝试为WCF项目更新MSBuild脚本,以创建_PublishedWebsites文件夹并将文件复制到该文件夹​​。 This works when I build locally in Visual Studio 2010. But when it runs on the TFS build server, it doesn't quite work. 当我在Visual Studio 2010中本地构建时,此方法有效。但是,当它在TFS构建服务器上运行时,则不能正常工作。

What I see there is that in "C:\\Builds\\1\\PROJECT\\PROJECT (Continuous Build)\\Sources\\PROJECT\\bin\\_PublishedWebsites", I can see all the files. 我看到的是,在“ C:\\ Builds \\ 1 \\ PROJECT \\ PROJECT(连续生成)\\ Sources \\ PROJECT \\ bin \\ _PublishedWebsites”中,我可以看到所有文件。

I'm guessing this "1 folder" is a temporary folder used for building...? 我猜这个“ 1个文件夹”是用于构建的临时文件夹...? I'm not sure what it's used for. 我不确定它的用途。 But when I look at the actual drop location for the build, in "C:\\Builds\\PROJECT (Continuous Build)\\PROJECT_BUILDNUMBER\\", I see nothing except log files. 但是,当我查看构建的实际放置位置时,在“ C:\\ Builds \\ PROJECT(连续构建)\\ PROJECT_BUILDNUMBER \\”中,除了日志文件,我什么都看不到。 None of the files from the "1 folder" are there. “ 1文件夹”中没有文件。

Note that this same solution also has a WiX project to create a deployment package. 请注意,该解决方案还具有用于创建部署程序包的WiX项目。 That seems to build fine, and shows up in the drop location with no issue. 看起来还不错,并且可以毫无问题地显示在放置位置。

"1 folder" is a temporary folder used for building
Yes. 是。 "1" is number of build agent(service that actually executes builds activities) on your build machine. “ 1”是构建机器上的构建代理程序(实际执行构建活动的服务)的数量。

But when I look at the actual drop location for the build, in "C:\\Builds\\PROJECT (Continuous Build)\\PROJECT_BUILDNUMBER\\", I see nothing except log files.
- Usually "Copy Files To Drop Location" flag is responsible for that. -通常,“将文件复制到放置位置”标志负责。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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