1

How can I find/set the Assembly Name for Web Site created in Visual Web Developer?

Actually I am trying out NHibernate with Visual Web Developer Web site. In the .hbm.xml (mapping file) contains a attribute called Assembly where we need to specify the Assembly Name of the Project containing the entity class.

Where can I find the assembly name for the Web Site?

If a assembly name not available for a web site, how can I overcome this situation?


Update: If I omit the assembly attribute, I am getting error telling me that the assembly attribute is missing.

Product.hbm.xml:

<?xml version="1.0" encoding="utf-8" ?>
    <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernateSol.Domain" assembly="NHibernateSol1">
        <class name="Product" >
            <id name="Id">
                <!-- generator class="guid" / -->
            </id>
            <property name="Name" />
            <property name="Category" />
            <property name="Discontinued" />
        </class>
    </hibernate-mapping>
Jason Plank
  • 2,336
  • 5
  • 31
  • 40
Rejeev Divakaran
  • 4,384
  • 7
  • 36
  • 36

1 Answers1

0
System.Reflection.Assembly.GetAssembly(typeof(A_Class_Name_Here)).GetName().Name;
Jason Plank
  • 2,336
  • 5
  • 31
  • 40
Dennis
  • 1