title: Controllers and Classes does not compile when publishing ASP.NET MVC 4
body: <p>I'm using Visual Studio 2012 to write a MVC 4 application. I'm writing C# code and I'm using Framework 4.5. My OS is Windows 7. I have published and deployed the application on local server many times without any problem. But now  I change some code in my controllers. It works fine when I debug my application. But when I publish my application and deploy it in localhost it seems that the changes have not been applied in the published versions. For example if I have an error and I fix it and debug it, it works but when I publish my application the error still exists. Another thing is that some portion of my code works fine in debug mode but not in published mode. This line is one of them.</p>
  
  <pre><code>RFH_ComplexRoomReserve firstRoom = db.RFH_ComplexRoomReserve.Where(d =&gt; (d.FKComplexRequestID == complexRequest.PKComplexRequestID)).First();
  </code></pre>
  
  <p>I searched a lot but could not find any solution. I think I'm making a dummy mistake. Any help is appreciated in advance.</p>
  
  <p><strong>UPDATE:</strong> </p>
  
  <p>My MVC 4 web project name is MyWeb. As I know when I build my solution MyWeb.dll file is created in bin directory in my project directory. When I publish my project MyWeb.dll file is created in bin directory of publish folder. I noticed that these two files have different sizes. The .dll file that is inside the project directory is bigger than the .dll file of publish directory. When I replace MyWeb.dll file that is in publish folder with MyWeb.dll from project folder, everything works fine. I think threre is something wrong with publishing process. But I cant find it out.</p>