JSideris
JSideris

Reputation: 5261

ASP.NET MVC Application won't update some controllers

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.

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?

Upvotes: 3

Views: 2156

Answers (1)

Dave Alperovich
Dave Alperovich

Reputation: 32500

  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

Upvotes: 2

Related Questions