I wrote a static method in an MVC (WebApi) website. The static method had a bug in it, so I changed the logic in the static method. The method now works on my local machine and returns the correct data.
However, Azure is STILL running the old method and returning the incorrect results. The only thing I could do was compile the library locally and FTP it up to Azure.
Why is the old static method being retained - even AFTER a build and deployment?
NOTE: I'm doing manual build/deployments from Visual Studio Online/TFS (I'm not deploying from Visual Studio). I do have Rebuild and Clean flags set on MSBUILD.
UPDATE: After looking at file sizes, apparently Azure is deploying an older version of the DLL as the DLL that's deployed is much larger than the one I'm compiling locally.
Is that new dll included in the file list you can see in preview just before you publish to your website? What are your publish options for the dll?
I assume you are using Azure Websites? Is that correct?
I'd just deploy to another Website instance, test as working using the default domain and if it all looks good redirect DNS and delete the old site.
Arggghhh!!!
After 2 days of troubleshooting, I finally figured it out.
Again, the local DLL was different than Azure's DLL in size. So I started thinking that they may be a problem w/ the file in Visual Studio Online.
So, I opened up another VM and connected to VSO to look at the source explorer. Sure enough, the file in VSO was the old version. Apparently, Visual Studio marked the file locally as being up-to-date so it wasn't being checked in with any new changes.
To fix:
It's finally deploying correctly again.