I have my own solution with 2 projects building in Visual Studio 2019. One is a C++ project and produces a C# wrapper .dll (mytest.dll). The other project is a C# test app that makes calls to the wrapper .dll. When running the test app on my Win 10 laptop, I can run without any problem
Testing on my build machine, which is Windows Server 2012 R2, I do this same process but trying to run my test app I get a runtime exception:
System.BadImageFormatException: 'Could not load file or assembly 'mytest.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)'
I'm guessing there's some SDK or something for C++ that I need to install. Hard to tell because I have a million SDKs and redists installed on my laptop. Or maybe a VS2019 setting?
Any ideas on what to check on the Windows Server machine?
Note:
1. Both machines have Visual Studio 2019 used to build