0

I'm having a little problem with my NHaml config:

<configSections>
    <section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/>
</configSections>

<nhaml AutoRecompile="true">
  <assemblies>
    <add assembly="Microsoft.Web.Mvc"/>
    <add assembly="MyAssembly"/>
  </assemblies>
  <namespaces>
    <add namespace="NHaml.Web.Mvc"/>
    <add namespace="MyAssembly.Models"/>
    <add namespace="System.Linq"/>
  </namespaces>
</nhaml>

The problem is that I'm trying to use a model from MyAssembly.Models in my view:

%ul
  - foreach(var v in (IQueryable<Model>)ViewData["stat"])
    %li= v.name

But it keeps crashing, telling me that MyAssembly.Models.Model is not recognized, and asking me if I'm lacking a using directive. Is there anything wrong in my web.config or my view?

Thanks in advance.

Gonzalo Quero
  • 3,303
  • 18
  • 23

1 Answers1

2

I have not used NHaml since it was part of MvcContrib, but back then I had my own models working by specifing the complete assembly name in the config eg:

MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Brendan Kowitz
  • 1,795
  • 10
  • 14