如何在 MSBuild 2.0 和 CrusiseControl.Net 中处理类库/解决方案/WebProject

发布于 2024-09-12 07:13:58 字数 526 浏览 2 评论 0原文

我正在研究 CI 工具 CruiseControl.Net 和 MSBuild。我有很多 .csproj、.sln 文件和 Web 项目(超过 30 个)。我们有 30 名开发人员,他们在任何给定时间内处理多个项目。

截至目前,开发人员尚未发布用于构建的 .sln 和 .csproj 文件。现在我的问题是如何处理构建文件: 1.由于开发者没有发布.csproj,我如何获取编译所需的新添加的文件?我如何获得新添加的 .Net Framework 和第三方 dll 引用?

2. Some cases the developer opens WebProject independently and make changes and release. In this case, how would i compile it?

3. How would i manage order of project dependencies?

我正在使用.Net 2.0/。

任何人都可以在这里建议和指导我。

谢谢, 禅丹

I am working on CI tool CruiseControl.Net and MSBuild. I have many .csproj,.sln files and web projects (more than 30). We have 30 developers and they work on multiple projects in any given time.

As of now, the developer do not release .sln and .csproj files for build. Now my question is how to handle build file as :
1. Since developer does not release .csproj and how would i get newly added files required for compilation? And how would i get newly added reference both .Net Framework and Third-party dlls?

2. Some cases the developer opens WebProject independently and make changes and release. In this case, how would i compile it?

3. How would i manage order of project dependencies?

I am using .Net 2.0/.

Can anyone suggest and guide me here.

Thanks,
chandan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

高速公鹿 2024-09-19 07:13:58

有很多方法可以实现自动化构建。我使用过的一种也适合您的方法是使用 NAnt 而不是 MSBuild。 Nant 有一个 csc 任务可供您使用。 (CSC.exe 是 csharp 编译器本身)

<csc target="library" output="yourbuildpath\yourproject.dll" debug="${debug}">
        <sources>
            <include name="**\*.cs" />
            <exclude name="**\AssemblyInfo.cs" />
        </sources>
        <references>
            <include name="lib\*.dll" />

        </references>
    </csc>

通过这种方式,您可以构建具有 .cs 扩展名的任何内容,而不是使用 csproj 或 sln 文件。所有开发人员都被告知将引用的第三方 dll 放置在已知的 lib 文件夹中。我仅将其用于类库和 Web 应用程序项目,我不确定它是否与网站项目一样简单。

There are many ways to automate builds. One way I have used that could work for you too, is to use NAnt instead of MSBuild. Nant has a csc task that you can use. (CSC.exe being the csharp compiler itself)

<csc target="library" output="yourbuildpath\yourproject.dll" debug="${debug}">
        <sources>
            <include name="**\*.cs" />
            <exclude name="**\AssemblyInfo.cs" />
        </sources>
        <references>
            <include name="lib\*.dll" />

        </references>
    </csc>

This way you build anything that has a .cs extension instead of using the csproj or sln file. All developers are told to place referenced third party dll's in a known lib folder. I have used this only with Class Library and Web Application projects, I'm not sure it's as simple with Website projects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文