重新配置许多项目的解决方案 [英] Re configuring solution with many projects

查看:79
本文介绍了重新配置许多项目的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的解决方案位于TFS 2010上,现在其中有39个项目.一个Windows应用程序项目和38个类库.到目前为止,我们的Windows应用程序项目使用CopyLocal = true保留对所有类库的所有引用.通过这种方式,生成的文件夹中会包含所有dll以及我们的.exe.

Our solution resides on TFS 2010 and now has 39 projects in it. One windows application project and 38 class libraries. So far, our windows application project holds all references to all class libraries with CopyLocal=true. This way build produces one folder with all dll's in it along with our .exe.

此设置不再对我们有用,我们需要从Windows应用程序中删除所有引用.项目(无论如何,都是使用反射来加载dll).我如何配置生成以像以前一样工作,但是在Windows应用中没有引用.项目?

This setup no longer works for us and we need to remove all references from windows app. project (dll's are loaded using reflection anyway). How can I configure build to work as before but without references in windows app. project?

推荐答案

您需要修改38个库项目的构建.有几种选择:

You need to modify the build of the 38 library projects. There are a few options:

您可以更改每个项目,使$(OutputPath)属性指向正确的放置文件夹,如下所示:

You can alter each project so that the $(OutputPath) property points to the correct drop folder, something like this:

<PropertyGroup>
   <OutputPath>..\Application\bin\$(Configuration)</OutputPath>
</PropertyGroup>

如果执行此操作,则将所有3​​9个属性更改为使用在其中定义了此属性的公共导入,并将它们全部构建到放置文件夹中.然后只需将应用程序项目更改为指向放置文件夹进行调试即可.

If I were doing this, I'd alter all 39 properties to use a common import in which this were defined, and have them all build to a drop folder. Then just change the application project to point to the drop folder for debugging.

同样,您可以在构建后部署步骤中(使用通用导入)连接导线,以在构建每个项目时将构建的程序集复制到放置文件夹中.

You can likewise (using a common import) wire in a post-build deployment step to copy the built assemblies to the drop folder as each project is built.

这篇关于重新配置许多项目的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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