I experienced this after switching a referenced library from a library targeting .net Framework 2.0 to one targetting Framework 4.0. My application targets .Net 6, so not a great error message.