1

Closed

The type or namespace name 'ViewModels' does not exist in the namespace 'Login.Views.Login' (are you missing an assembly reference?) C:\Users\E561158\Desktop\Login\Login\Views\Login\LoginPage.generated.cs

description

Hi,

I used Razor Generator for the cshtml files.

My project structure is like:
  1. Controllers(Folder) ->LoginController -> LoginPage action
    2.ViewModel(folder) -> LoginDetails.cs file
While creating a view for LoginPage action i did LoginDetails model as strongly typed, After that when i did build i got error like "Error 3 The type or namespace name 'ViewModels' does not exist in the namespace 'Login.Views.Login' (are you missing an assembly reference?) C:\Users\E561158\Desktop\Login\Login\Views\Login\LoginPage.generated.cs 33 71 Login"

I added namespace in the both web.config files as "Login.ViewModels" but still getting the error.

How to resolve this issue.

file attachments

Closed Jul 5, 2013 at 5:57 PM by davidebbo

comments

davidebbo wrote Jul 4, 2013 at 1:28 PM

Looks like some namespace confusion due to the duplicated 'Login' token in Login.Views.Login. Similar to this one, and same suggestions should work.

bvsaikishore506 wrote Jul 5, 2013 at 7:53 AM

Thanks davidebbo its working fine now. Instead of "Login" i changed controller name as "LoginPage".