asp.net mvc - MVC Reference assembly missing -


i have issue refrerencing assembly in view mvc. namespace part of dll have part of project, works fine if use derectly inside view gives below:

an error occurred during compilation of resource required process request. please review following specific error details , modify source code appropriately.

/views/user/tasks.cshtml 

the type 'tasktype' defined in assembly not referenced. must add reference assembly 'hrservicecalls, version=1.0.0.0, culture=neutral, publickeytoken=null'.

if ref assembly in _viewimports.cshtml below.

an error occurred during compilation of resource required process request. please review following specific error details , modify source code appropriately.

/views/_viewimports.cshtml 

the type or namespace name 'hrservicecalls' not found (are missing using directive or assembly reference?)

@using hrservicecalls 

i added ref web config no avail.

<system.web>     <compilation debug="true">       <assemblies>         <add assembly="hrservicecalls, version=1.0.0.0, culture=neutral, publickeytoken=null"/>       </assemblies>     </compilation>   </system.web> 

can point out need ref working in views. models , controllers have no issue it.

the views folder has it's own web.config file make sure add there if want use it.

of course there question need reference there or enough use in controller , send data view view model?


Comments