简体   繁体   English

.NET构建过程 - Github / Git和Dependent项目

[英].NET Building Process - Github/Git and Dependent Projects

I'm currently using Github/Git for two .NET solutions. 我目前正在使用Github / Git来实现两个.NET解决方案。 The first solution is a library of common .NET code for all projects at my company, the second solution is a ASP.NET MVC Web Application. 第一个解决方案是我公司所有项目的常用.NET代码库,第二个解决方案是ASP.NET MVC Web应用程序。

What does a proper Nant or MSBuild file look like for cloning first repo, build it, clone second repo, add assemblies from first solution to the second? 适当的Nant或MSBuild文件用于克隆第一个repo,构建它,克隆第二个repo,从第一个解决方案添加到第二个解决方案的组件是什么样的? I plan on using Jenkins as my build server. 我打算使用Jenkins作为我的构建服务器。 I'm unclear of which parts are handled by the build server and which by the build file. 我不清楚构建服务器处理哪些部分以及构建文件处理哪些部分。 I don't want to reinvent the wheel. 我不想重新发明轮子。 Thanks. 谢谢。

use submodules to link the two. 使用子模块链接这两个。 You will be able to clone recursively and have all that you need for your build to work. 您将能够以递归方式克隆并拥有构建所需的所有功能。

You can have a build process set up for your company library that puts the compiled binaries into a shared location. 您可以为公司库设置构建过程,将已编译的二进制文件放入共享位置。 For example a shared network drive, or (preferably) a private NuGet repository if you're using Visual Studio. 例如,共享网络驱动器,或者(最好)私有NuGet存储库(如果您使用的是Visual Studio)。

Then you add a reference to the assembly/NuGet package in your other projects. 然后在其他项目中添加对assembly / NuGet包的引用。 Personally, I'm a big fan of the NuGet route. 就个人而言,我是NuGet路线的忠实粉丝。

The benefit of using NuGet is that you don't have to use the new version as soon as it is released (although it is easy to upgrade). 使用的NuGet的好处是,你不必尽快使用新版本,因为它被释放(虽然它很容易升级)。

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

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