2

Before we used TFS, we were building our packages locally using visual studio. There was a lot of projects organized into solutions. When we wanted to build the package, we simply located the ccproj project, right click on it and hit “package”.

There is couple of specific in our solution:

  • We use web roles with multiple web sites and virtual applications and we have them as project dependencies in VS2012 solution
  • We use config transformations for both web and worker roles. Worker roles transforms was achieved by adding transform target manually to the project file.
  • We have some additional class library projects – their outputs needs to go in a subfolder of the worker role along with correct configuration files, it is kind of plug-in architecture. We used some xcopy commands to include these non-referenced libraries in our worker roles.

Everything worked smoothly when building in VS 2012 locally.

When migrated to TFS we quickly learned that we won’t be able to replicate the same build process on build server

  • It turned out that TFS is not preserving solutions structure, more details here: http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/9ac815c8-5961-4670-a6d0-660a9b66da9c
  • The project dependency that was solving multiple web sites and virtual applications in a single role did not work on build server, probably because of different output directory. We had to add some hacks in our ccproj and csproj files to get these published and correctly included in the resulting package.
  • xcopy commands failed because of different directory structures on TFS build sever.
  • We had to force run cspack on TFS build server by explicitly adding /t:Publish parameter to msbuild command line.
  • Config transforms for worker roles did not worked, we had to force to occur using another hacks in the ccproj and csporj files.
  • There was more issues but those are too detailed. I would keep it on high level just to illustrate the whole issue. The build somehow works now, but we have now a lot of hacks in place now.

I have two questions:

  1. Is it possible to configure TFS build server to have exact same behavior as the local build in VS2012?
  2. Is there any official solution for building azure packages with multiple web sites and virtual applications in a single web role?
4

1 回答 1

0

我还没有在 TFS 构建服务器上尝试过这个,但是在我的博客http://michaelcollier.wordpress.com/2013/01/14/multiple-sites-in-a-web-role/中概述的方法有一直运作良好。“技巧”基本上是修改 .ccproj 文件以利用 CoreBuildDependsOn 目标,添加将对辅助站点执行 MSBuild 的逻辑。这也应该允许配置转换工作。

于 2013-03-07T13:48:39.710 回答