简体   繁体   English

TFS 2013-具有嵌套依赖项的MSBuild项目

[英]TFS 2013 - MSBuild Project with Nested Dependencies

All, 所有,

I have several top level projects (console apps, websites, etc) that have internally built dependency projects. 我有几个顶级项目(控制台应用程序,网站等),这些项目在内部构建了依赖项项目。 Some of these sub-projects are referenced in the top level projects by including the DLL from the sub-project's bin folder, and some are referenced by including the project in the solution. 通过在子项目的bin文件夹中包含DLL,可以在顶级项目中引用其中的一些子项目,而通过在解决方案中包含项目来引用其中的一些子项目。 I have no idea which way is the "right" way, but I do know I can't get any of my top level projects to build using TFS Continuous build. 我不知道哪种方法是“正确”的方法,但是我知道我无法使用TFS连续构建来构建任何顶级项目。 They build locally, but not in TFS Continuous build. 它们在本地构建,但不在TFS连续构建中。 They usually fail with a series of "can't find reference" errors. 它们通常会因一系列“找不到参考”错误而失败。

My though is that I will need to take each of the sub-projects (models, repositories, etc) and have them build to a central location, then reference that central location in the top level projects. 我的意思是,我将需要接受每个子项目(模型,存储库等),并将它们构建到一个中心位置,然后在顶级项目中引用该中心位置。 The only thing I don't like is that I don't see a way to only let DEV branch builds copy to the central location unless I just use a post-build event script on the DEV branch project. 我唯一不喜欢的是,除非我仅在DEV分支项目上使用构建后事件脚本,否则我不会看到仅让DEV分支将构建副本复制到中央位置的方法。

If anyone out there can help me find some Zen with this process, I would appreciate it. 如果有任何人可以通过此过程帮助我找到一些Zen,我将不胜感激。 I am a software engineer, not a build engineer... 我是软件工程师,而不是构建工程师...

If you're versioning dependencies separately from applications that use them, then use NuGet for managing the dependencies. 如果要与使用依赖项的应用程序分开对依赖项进行版本控制,请使用NuGet来管理依赖项。 As part of the build process, the packages will be restored. 作为构建过程的一部分,将还原软件包。

Binaries should basically never be in source control. 二进制文件基本上不应处于源代码控制中。

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

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