Custom librairies with Razor with the release version of MVC 3

Posted by Maxim on Stack Overflow See other posts from Stack Overflow or by Maxim
Published on 2011-01-17T15:49:00Z Indexed on 2011/01/17 15:53 UTC
Read the original article Hit count: 176

Filed under:
|
|
|

So I'm developing an in-house library for MVC 3 and I want to add it to my project.

I added it to my web.config. I added the assembly and added it to the pages -> namespaces section and... no. Doesn't work.

I tried recompiling, etc... but Razor doesn't like it at all. It's not an intellisense problem... the site can't run if I use my defined namespace.

The only way that I made it work was by using the following statements:

@using Sample.Helpers

I don't want to use it in the pages. I want to be able to deploy it to many projects and adding it to the web.config is definitely the way to go.

Anyone ran into this problem?

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc