1

I've got a solution with several different projects in it, some are pure class libraries and some are web app projects. If I want my default types to be available to all projects, where should I put the config file for the container?

4

1 回答 1

1

我倾向于做的是在解决方案根目录中创建它。然后,对于每个需要它的项目,我会:

  • 右键单击->添加现有
  • 浏览并选择文件
  • 单击向下箭头并选择“添加为链接”
  • 选择项目中的文件
  • 特性
  • 构建动作 -> 内容
  • 复制到输出目录 -> 如果更新则复制

然后,当您初始化 Dependency Inject 框架时,您可以使用类似Server.MapPath("~/bin/filename.config").

于 2008-10-17T23:36:46.060 回答