I have to update an old vb.net app built on .net 3.5, so I recreated its environment which includes several 3rd party dlls. Everything works fine on my Win11 Home laptop. However, my Win11 Pro desktop cannot run this app in the VS2019 IDE. It produces the error 'can't load assembly because it is built with a newer runtime than currently loaded'. By looking at the Modules list I can see which DLL is causing the problem. The reference is correctly set for this InteropDLL which is built on .net V2.0.50727. When I Run the IDE, VS2019 builds a modified version of this Interop using .net 4.0.30319. When attempting to load this module, it hits the error.
I can manually replace the InteropDLL in the debug folder with a copy of the originally referenced InteropDLL and can run the EXE. However, if I Start the IDE, it immediately replaces that DLL and I hit the error.
Any suggestion as to what I might try in this situation? The Win11 Home laptop works correctly with an identical copy of the project folder.