Peter Evjan
Peter Evjan

Reputation: 2433

Where to put the dependency injection framework config file?

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?

Upvotes: 1

Views: 409

Answers (1)

kͩeͣmͮpͥ ͩ
kͩeͣmͮpͥ ͩ

Reputation: 7846

What I tend to do is to create it in the solution root directory. Then, for each project that needs it, I do :

  • right click->Add Existing
  • Browse to, and select file
  • Click on down arrow and select "Add as link"
  • Select the file in the project
  • Properties
  • Build Action -> Content
  • Copy To Output Directory -> Copy if newer

Then, when you initialise your Dependency Inject framework, you can use something like Server.MapPath("~/bin/filename.config").

Upvotes: 1

Related Questions