开发者

External References not referenced in Razor View

I am working with MVC3 with razor view. I am trying to use a model from different project than the mvc3 project, for same its report compilation error as

CS0246: The type or namespace name 'MyNameSpace' could not be found 开发者_如何学C(are you missing a using directive or an assembly reference?)

as answered in some other posts, I tried to add @using directive or editing web.config in Views folder, but it is still not working.

Could somebody please suggest.


I was missing a assembly to my project. Seems adding the reference wasn't enough.


Correct, adding the reference wouldn't be enough. It needs to be added as an assembly to the project, or the compiler won't be able to find the library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜