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 7487969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:42:11+00:00 2026-05-29T14:42:11+00:00

I used ReSharper’s Optimize References functionality on one of my C# projects, and it

  • 0

I used ReSharper’s “Optimize References” functionality on one of my C# projects, and it removed a pair of references to Fluent Nhibernate / Nhibernate. I thought this was completely valid because I don’t reference anything from them directly in that project.

When I rebuild the solution I was greeted with:

The type ‘FluentNHibernate.Mapping.ClassMap`1’ is defined in an assembly that is not referenced.

The project (which we will call A) doesn’t directly reference Fluent Nhibernate, but does reference another project B, which uses Fluent NHibernate for mappings. As far as the usage of B in A, I do use a class that has a FNH Map within it, but I don’t use/reference that inner class anywhere in A.

I thought if a .Net project didn’t reference an assembly in code directly, it didn’t need to be in the project references. Or was this assumption wrong in this case?

  • 1 1 Answer
  • 0 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-29T14:42:13+00:00Added an answer on May 29, 2026 at 2:42 pm

    I’m not sure why you get this particular error, but I’ve seen similar problems with FNH / NH support DLLs, notably the Castle DLLS, and Log4Net.

    Many tools will tell you these references are not required, but you get runtime errors if you try to eliminate them.

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

Sidebar

Related Questions

On my .NEt projects I'm used to the tool called ReSharper but my current
Never used a cache like this before. The problem is that I want to
When used like this: import static com.showboy.Myclass; public class Anotherclass{} what's the difference between
We used to use SourceSafe, and one thing I liked about it was that
I used to see any .net source code (like System.String) with ReSharper and Visual
I have been using ReSharper for quite a long time and get used to
I have earlier used mbunit 2 and with this plugin I could get my
Sub directories within VS2008 projects are mainly used to physically represent on disk the
This might be a personal preference, but I'm bit used to do this kind
Has anyone used PostSharp with ReSharper, if so what problems should I expect?

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.