When I have the following bit of code in my C# Class Library, it totally breaks the library for everything else.
namespace DesktopOCA.Infastructure
{
public class NHibernateHelper
{
private static ISessionFactory _sessionFactory;
}
}
For example this is also in that project:
namespace DesktopOCA.Infastructure
{
public static class RegionNames
{
public const string MainRegion = "MainRegion";
}
}
When I dont include the
private static ISessionFactory _sessionFactory;
line everything else in my solution can see RegionNames.MainRegion. But as soon as I make any reference to an ISessionFactory, it breaks. That particular class library still compiles fine. I can add it as a reference in other parts of the project, but it's like there is nothing there.
I get the error
Error 40 The name 'RegionNames' does not exist in the current context
Any help would really be appreciated here, this seems really weird to me.