找不到类型或命名空间名称“LoginViewModel” [英] The type or namespace name 'LoginViewModel' could not be found

查看:256
本文介绍了找不到类型或命名空间名称“LoginViewModel”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

建立小型宣传册MVC网站,无需认证。它在Visual Studio中被禁用。第一次成功地将Visual Studio 2015发布到我的工作站IIS。现在当我再次尝试发布时,我得到无法找到类型或命名空间名称'LoginViewModel'......以及一堆看似与登录验证相关的其他错误。



如何解决这个问题?

Building small brochure-ware MVC website with no authentication. It's disabled in Visual Studio. Published with Visual Studio 2015 to my workstation IIS successfully the first time. Now when I attempt to publish again I get "The type or namespace name 'LoginViewModel' could not be found..." and a bunch of additional errors seemingly connected to login authentication.

How do I get around this?

推荐答案

经过一番挖掘后,我发现Visual Studio插入了一系列帐户视图,即使我没有指定我启动项目时的身份验证。这些将在测试模式下构建好,但在发布到我的测试服务器时会失败。删除帐户视图解决了问题。
After some digging I discovered that Visual Studio had inserted a series of "Account" views even though I specified no authentication when I initiated the project. These would build OK in test mode, but would fail when publishing to my test server. Removing the Account views fixed the problem.


这篇关于找不到类型或命名空间名称“LoginViewModel”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆