对于在Visual C#速成多种解决方案工作的良好实践 [英] Good practice for working with multiple solutions in Visual C# Express

查看:94
本文介绍了对于在Visual C#速成多种解决方案工作的良好实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我的团队是由3相当经验的开发人员。我们正在开发的内部软件的公司。目前,我们有一些小的和独立的解决方案。其中有许多是相互依存的。目前,这些depencies被引用输出的DLL在各自的发行文件夹进行。更新是通过手动重建相关的解决方案摆布。

Background: My team is made up of 3 fairly inexperienced developers. We are developing in-house software for our company. Currently we have a number of smaller and separate solutions. Many of these are interdependent. Currently these depencies are made by referencing the output dll's in the respective release-folder. Updates are pushed around by manually rebuilding dependent solutions.

示例:
液A使用溶液B.连接是由具有解决方案A引用... \Release功能\B.dll。变化通过构建解决方案B,然后建立一个解决方案等等到B传播。

Example: Solution A uses features of solution B. The connection is made having Solution A referencing ...\Release\B.dll . Changes to B propagates by building solution B, then building solution A and so forth.

这已经首肯才能工作,但现在我们正在从一个手动(头脑麻木)版本控制系统(文件夹1,文件夹2,folder2New ...)使用移动适当的一个(GIT)。

This has worked okay before, but now we are moving from a manual (mind numbing) "version control system" (folder1, folder2, folder2New...) to using a proper one (git).

看来,版本控制该.dll的不建议使用。这意味着,每次有人要造一个新版本,他也需要以拥有最新版本的B建立B(也许5其他解决方案)。

It seems that versioning the .dll's is not recommended. This means that every time someone wants to build a new version of A, he also needs to build B (and maybe 5 other solutions) in order to have the latest version of B.

我在想,必须有一个更好的方式来做到这一点。
我一直在看相关的解决方案组合成一个主的解决方案,但我不能想出如何在Visual C#速成做到这一点(我们正在使用)。

I'm thinking that there must be a better way to do this. I've been looking at combining the relevant solutions into one master solution, but I can't figure out how to do this in Visual C# Express (which we are using).

因此,在持续的时间问题:


  1. 是具有一个主解决方案这一切都建立要走的路?
    - 它从MSDN似乎如此,但我无法弄清楚如何在Visual C#Express 2008的,这利兹我

  1. Is having a master solution that builds everything the way to go? -- it seems so from MSDN but I can't figure out how to do this in Visual C# Express 2008, which leeds me to

做到这一点这甚至可能在Visual C#Express吗?如果没有,什么是
管理问题的好办法吗?

Is this even possible in Visual C# Express? If not, what is a good way of managing the problem?

修改感谢所有为下面的很好的建议。这里是什么我最后做一个总结

Edit Thanks to all for the great suggestions below. Here's a summary of what I ended up doing.

在短的问题的回答是:是和排序的,但大多是。我实现如下:为了获得依赖的想法,我做了如下的建议,并提请地图二进制产品,具有从DLL的或EXE的名称,其所有相关的箭头指向。

In short the answers to the questions are: "Yes" and "Sort of, but mostly yes". I implemented as follows: In order to get an idea of the dependencies, I did as suggested below, and drew a map of the binary products, with an arrow pointing from the dll's or exe's name to all of its dependencies.

对于每个项目的,我开设了相应的的(因为在第一次出现了的有一个解决方案公关项目)。后来我加入了图形显示树状结构每一个依赖的project文件(通过右键单击在解决方案资源管理解决方案),这样也依赖条件的依赖关系等等都包括在内。然后,我删除旧的参考(直接指向.dll文件),并添加引用,而不是项目

For each project, I opened its corresponding solution (since at first there was one solution pr project). I then added the projectfile of each dependency in the tree structure revealed in the graph (by right-clicking the solution in solution explorer), so that also dependecies's dependencies and so forth were included. Then I removed the old references (pointing directly to the .dlls) and added references to the projects instead.

重要的结果是:


  • 当一个项目的解决方案是建立,所有它的依赖与它建立,使部署的时候,你知道,所有构建的产品都会自动的最新版本。

推荐答案

我将创建一个新的解决方案,并添加所有相互关联的项目给它。您可以将通过把它们放在不同的解决方案文件夹中的新的解决方案内每一个原始的解决方案的项目。这样,当你建立一个项目,所有的项目它取决于也会得到建立。这也意味着,所有的项目都将使用相同的配置(即Release或Debug)来构建。这意味着的所有项目的可建在调试,而不仅仅是其中最突出的依赖关系树,而一切在它下面是一个释放组件。使调试变得更加容易。

I would create a new solution and add all of the projects that relate to each other to it. You can group the projects from each of the original solutions by putting them in different solution folders within the new solution. This way, when you build a project, all of the projects it depends upon will also get built. It also means that all of your projects will be built using the same configuration (i.e. Release or Debug). This means that all of your projects can be built in Debug, not just the top one in the dependency tree while everything below it is a Release assembly. Makes debugging much easier.

这篇关于对于在Visual C#速成多种解决方案工作的良好实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆