Converting VC++ project from VS2013 to VS2019 giving error is not a valid Win32 application

0

I had an old VC++ project on VS2013, now I have converted that project to VS2O19. It is able to create the dll successfully.

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <PlatformToolset>v142</PlatformToolset>
    <UseOfMfc>false</UseOfMfc>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>

But that .dll not able to load in my web application. It is throwing below error.

Could not load file or assembly 'abc.xyz.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) System.BadImageFormatException: Could not load file or assembly 'abc.xyz.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) Filename: 'abc.xyz.dll'

asp.net
.net
visual-c++
visual-studio-2013
visual-studio-2019
asked on Stack Overflow Apr 14, 2020 by Sounak Saha

1 Answer

0

@Joseph Willcoxson comments help. After installing Visual C++ 2019 runtime on the target machine this problem get resolve.

answered on Stack Overflow Apr 15, 2020 by Sounak Saha

User contributions licensed under CC BY-SA 3.0