1

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 (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.

Community
  • 1
  • 1
PushpRaj
  • 595
  • 1
  • 5
  • 11

2 Answers2

2

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

BenMorel
  • 34,448
  • 50
  • 182
  • 322
PushpRaj
  • 595
  • 1
  • 5
  • 11
0

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.

neontapir
  • 4,698
  • 3
  • 37
  • 52