I have three projects:
TestNHibernateMappings
- A console projectWebApplicationPbiBoard
- An Asp.Net MVC 3 Web projectWebApplicationPbiBoard.Tests
- An MsTest projectTestNHibernateMappings
needs a reference to the PbiMap
class located in WebApplicationPbiBoard.Models.ScrumModels_Mappings
.
I've added WebApplicationPbiBoard
as a project reference to TestNHibernateMappings
, but Visual Studio keeps giving me namespace non-existence error when I try to include it. I've also tried removing and re-adding the reference, and performing a clean build of the entire solution both with no luck.
Any idea how to fix this? I've tried teaching my project about Descartes and disabling the Solipsist=true flag in the Console App, but those didn't work out either. Thanks in advance.
Here's the relevant code:
MsSqlConnectionStringBuilder builder = new MsSqlConnectionStringBuilder();
builder.Database("WebApplicationPbiBoard");
builder.Server("local");
builder.TrustedConnection();
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(builder.ToString()))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<WebApplicationPbiBoard.Models.ScrumModels_Mappings.PbiMap>())
.BuildSessionFactory();
The Fluently.Configure()...
part is my attempt to configure a FluentNHibernate Session.
Check the target framework for TestNHibernateMappings
and set it to .NET Framework 4.0. I suspect that you currently have it set to .NET Framework 4.0 Client Profile and that is the issue.