I have a C# DLL project which has target Framework .NET Framework 4.5. It has a reference to external DLL my-external-dll written in C++ and built with MSBuild version (C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319). In Visual Studio, properties of my-external-dll shows Runtime Version as v4.0.30319.
Everything was working fine until recently we had some changes in the my-external-dll. New field was added to a structure.
I can see that new field in Visual Studio when I open my-external-dll in Object Browser. But when I run my application, it throws exception saying "Field not found" for the newly added field. I have cleaned the solution(bin folders of both DLL and my-external-dll) and rebuilt everything still same error. Even installed VS2017, still same error. It does not give any errors in the build or compilation. But throws exception runtime.
Have checked similar topics here which suggest cleaning solution and rebuilding but that doesn't help.
Please help.