Library / Static Method Not Updating in Azure

I wrote a static method on the MVC website (WebApi). The static method had an error, so I changed the logic in the static method. Now the method works on my local computer and returns the correct data.

However, Azure STILL starts the old method and returns incorrect results. The only thing I could do was copy the library locally and FTP to Azure.

Why is the old static method preserved - even AFTER assembly and deployment?

NOTE. I am doing manual assembly / deployment from Visual Studio Online / TFS (I am not deploying from Visual Studio). I have the Rebuild and Clean flags installed on MSBUILD.

UPDATE: after looking at the file sizes, obviously, Azure deploys an older version of the DLL, since the deployed DLL is much larger than the one I compile locally.

0
source share
3 answers

Is this new dll included in the list of files that you can preview in a preview before publishing to your site? What are your publishing options for dll?

I assume you use Azure websites? It is right?

0
source

I would just turn around to another instance of the website, test using the default domain, and if it looks good it redirects DNS and removes the old site.

0
source

Arggghhh !!!

After 2 days of troubleshooting, I finally figured it out.

Again, the local DLL is different from the size of the Azure DLL. So I started to think that this could be a problem with the file in Visual Studio Online.

So, I opened another virtual machine and connected to VSO to look at the source wire. Of course, the file in VSO was an old version. Apparently, Visual Studio placed the file locally as relevant, so it was not registered with any new changes.

To fix it:

  • Do an exclusive file check in Visual Studio
  • Then try checking
  • Then you should finally (!!!) get the merge error
  • Merge local file with file in repository
  • Return the file back to VSO.

Finally, it deploys correctly again.

0
source

Source: https://habr.com/ru/post/986736/


All Articles