Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:43:46+00:00 2026-05-15T23:43:46+00:00

I have the following project structure using a Domain Model, StructureMap and Fluent NHibernate:

  • 0

I have the following project structure using a Domain Model, StructureMap and Fluent NHibernate:

Project Structure

The problem I’m having is that Fluent NHibernate requires all of the following to be the bin directory of the website for it to work at runtime:

  • Antlr3.Runtime.dll *
  • Castle.Core.dll
  • Castle.DynamicProxy2.dll
  • FluentNHibernate.dll *
  • Iesi.Collections.dll *
  • log4net.dll *
  • NHibernate.ByteCode.Castle.dll
  • NHibernate.dll *

The problem I’m having is that not all of these assemblies are output to my website’s bin directory. Currently only the items with a * are output correctly. The items in bold are missing from the bin directory.

Now, I would of assumed that the reason for this is because I have not added them as references to my Fluent NHibernate project. The only references I currently have are to NHibernate.dll and FluentNHibernate.dll. These two references alone are enough to bring through the items marked with a *, but they do not bring through the missing items.

So, I then thought that to get them to all come through I’d just add them as references to the Fluent NHibernate project. Unfortunately, this made no difference; the same items were still missing from the bin directory.

I’ve never really understood how visual studios decides which assemblies to copy over. I always assumed it was any assembly marked as Copy Local=true, but this doesn’t seem to be the case in this scenario.

Of course I could just add all the assembly references into Website, but then that’d completed defeat the point of loosely coupling the projects through StructureMap.

Does anyone have any idea why the assemblies are missing and how I can get them to copy over correctly?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:43:47+00:00Added an answer on May 15, 2026 at 11:43 pm

    You can either add references to the project that requires those files be present in the output directory (Website in your case) or you can add a post-build step in your build script to copy them across.

    This is a case of VS and the compiler being “smart” about whether references are actually required or not. The C# compiler optimizes out those references that aren’t actually required. Adding a reference to non-required assembly in VS will ensure it appears in the output directory of that project. However, dependent projects will only get that same assembly if it’s actually used by the project referencing it. That is, if the C# compiler hasn’t optimized its reference out. That’s why you would need to add the reference to the Website project, if you go that route.

    Personally, I did exactly that. I don’t really think this is tight coupling since NH still resolves the assemblies dynamically at runtime. And it’s not like I can’t just substitute in other byte code assemblies manually and restart my app. But it’s also not like I would do that without adequate testing, so in a way I consider myself to be coupled to Castle on the basis of that. And, therefore, I’m not irked by the references.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Python project with following directory structure: /(some files) /model/(python files) /tools/(more
I've noticed that a lot of projects have the following structure: Project-A bin lib
I have a C project that has the following structure Main/ Makefile.am bin/ src/
I have the following IntegrationTest project structure ... If i wish to use that
Let's suppose I have the following structure in my project (I'm using iBatis as
I have created the following project structure for my new asp.net mvc project any
I have the following folder structure /project /scrape item.py /spiders myscraper.py inside the file
I have the following directory structure: project/ .git/ ... app/ ... config/ initializers/ braintree.rb
Suppose I have the following (desired) folder structure: *CommonProject *Project#1 ----> CommonProject(link) *Project#2 ---->
I have the following directory structure of a project: Folder project in Eclipse: --folder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.