TFS 2010链接文件失败的构建链接、文件、TFS

2023-09-06 17:05:37 作者:樱花酱萌妹

我有两个Visual Studio 2010的解决方案 - 一个包含一类项目4个文件,其他有通过链接到这些文件中的添加链接(也是一类项目)。这些解决方案既要建设,没有任何问题,运行我的机器上。

I have a two Visual Studio 2010 solutions - one contains 4 files in a class project, the other has links to those files via the "Add as Link" (also in a class project). These solutions both build and run on my machine without any issues.

我已经检查了这些解决方案集成到TFS,并创建了被配置来构建他们两个(一个与第一个实际的文件,如果该事项)。

I have checked these solutions into TFS and created a build definition which is configured to build both of them (the one with the actual files first if that matters).

然而,当我运行构建失败说的类型或命名空间名称xLinkedFileClassx'找不到(是否缺少using指令或程序集引用?)在每个链接的文件类不同地点被引用(没有其他错误显示)。

However, when I run the build it fails saying that "The type or namespace name 'xLinkedFileClassx' could not be found (are you missing a using directive or an assembly reference?)" for each of the linked files classes in the various locations they are referenced (no other errors are shown).

纵观生成服务器,这些在build文件夹(C:/构建/ ......),这些文件不存在。如何获取TFS应对这些链接的文件?

Looking at the build folder on the Build Server these (C:/Builds/...) these files do not exist. How do I get TFS to cope with these linked files?

推荐答案

嗯,看来我确实在我的code一些错误,它表现出来,这个不起眼的错误!

Well it seems I actually had some errors in my code and it manifested itself into this obscure bug!

在我的配置我建立的释放,而不是在调试(反之亦然),某些项目,但我的生成定义设置为释放和我调试它在调试的Visual Studio所以它没有察觉的错误。修复这些bug似乎一切都整理出来。

In my configuration I am building certain projects in Release and not in Debug (and vice versa), but my Build Definition was set to Release and I was debugging it in Visual Studio in Debug so it wasn't spotting the errors. Fixing these bugs seemed to sort everything out.

基本上,如果你得到任何奇怪的错误,请确保您在调试构建项目,并发布在Visual Studio以防万一这东西隐藏。

Basically if you get any strange errors, make sure you build your projects in Debug and Release in Visual Studio just in case it is something hiding.