'C# renamed class reference issue

We have ASP.NET MVC application which is running on windows server machine. I have renamed classes to satisfy sonar scanning. The code deploys and runs without issue locally and in our SIT server. However, it is showing error in UAT server on windows server machine. It shows warning in event viewer that it could not find reference to previously renamed class. I have renamed a class from "CarDTO" to "CarDto", it is still trying to look for CarDTO which does not exists after the rename.

I have tried to do the following but none seems to solve the issue.

  • Restart IIS
  • Recycle application pools
  • Clear asp.net temporary folder
  • Increase the version in assembly info

I used the same files and dll in both SIT and UAT servers.

Anyone has similar issue and a way to solve this? Thank you.



Solution 1:[1]

Thanks for the suggestions. Apparently, there is an extra dll that accidentally being copied to the bin folder. Even though it is not being used, it gets compiled by IIS and complaining that class name mismatched.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Han S