ASP.NET MVC应用程序不会更新某些控制器 [英] ASP.NET MVC Application won't update some controllers

查看:49
本文介绍了ASP.NET MVC应用程序不会更新某些控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2012中针对Web应用程序的发布Web"选项发布到IIS.当我发布控制台时,控制台告诉我构建和发布成功,并且在大多数情况下所有内容都可以正确发布.但是最近有一个控制器尚未发布.没有错误,但不会发布.

I'm publishing to IIS using the publish web option within visual studio 2012 for web applications. When I publish the console tells me building and publishing was successful, and for the most part everything does publish correctly. But there is one controller that hasn't been publishing recently. There are no errors, but it just won't publish.

我尝试删除控制器和视图,清理解决方案,关闭Web服务器,删除整个发布目录,然后重新发布.但是,当我再次启动服务器时,旧控制器仍然存在!因此,我创建了一个具有不同名称的新控制器并发布-新控制器与旧幻象一起成功发布,但是现在我需要进行更改,因此我遇到了与新控制器相同的问题...我不知道不明白为什么会这样.有人看过吗?

I tried deleting the controller and view, cleaning the solution, shutting down my webserver, deleting the entire publish directory, and republishing. But when I start up the server again the old controller is still there! So I created a new controller with a different name and published - the new controller successfully published along with the old phantom one, but now that I need to make changes I've run into the same problem with the new controller... I don't understand why this is happening. Anyone seen this before?

推荐答案

  1. 打开解决方案资源管理器
  2. 右键单击文件
  3. 点击属性
  4. 复制到输出更改为始终复制如果更新则复制
  1. open solution explorer
  2. right click on the file
  3. click properties
  4. change Copy To Output to Copy Always or Copy if newer

这篇关于ASP.NET MVC应用程序不会更新某些控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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