tfs 构建内容输出目录

tfs 构建内容输出目录

问题描述:

我有以下场景:

  • 一个 C# 类库
  • TFS 版本 2012

在项目中我有以下结构:

In the project i have the following structure:

-Resources
---File.extension (type: content, copy always)

当我使用 Visual Studio 构建本地时,我得到以下信息:

When I build this localy with visual studio I get the following:

bin\resources\File.extension

这是我想要和期望的,但在 tfs 构建中我得到以下内容:

This is what I want and expect, but on the tfs build I get the following:

bin\File.extension

我一直无法弄清楚为什么会发生这种情况.我想知道为什么会发生这种情况.

I haven't been able to figure out why this is happening. I would like to know why this could be happening.

您可以在 Build Process→Build→Outputlocation 中指定 Build Output Location.默认值为 SingleFolder,这就是您得到它的原因.要实现您想要的,您可以将其更改为 AsConfigured.

You can specify the Build Output Location in your Build Process→Build→Outputlocation. The default value is SingleFolder, this is why you got this. To achieve what you want, you can change it AsConfigured.

要控制 TFBuild 放置构建输出的位置,请选择:

To control where the TFBuild places the build outputs, choose:

• SingleFolder :将所有构建输出文件一起放在 drop 文件夹中.

• SingleFolder :to place all the build output files together in the drop folder.

• PerProject :将构建输出分组到您在项目"框中指定的每个解决方案或代码项目的放置文件夹子文件夹中.

• PerProject :to group the build outputs into drop folder sub-folders for each solution or code project that you have specified in the Projects box.

• AsConfigured :将二进制文件保留在构建代理源文件夹中,组织成与您在 Visual Studio 中的开发机器上构建代码时看到的相同子文件夹结构.此结构在您的代码项目中定义.

• AsConfigured :to leave the binaries in the build agent sources folder, organized into the same sub-folder structure you see when you build your code on your dev machine in Visual Studio. This structure is defined in your code projects.