Open pranavsharma opened 5 years ago
Did you add a reference to the dll?
In order to get the msdia140 interop to work you must add msdia140.dll as a reference to the C# project. That is done either by dragging and dropping the dll onto the references folder in the C# project or by right clicking the references folder, selecting "Add Reference" and then browsing for the msdia140 dll.
That fixed this error for me but led to another one:
Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {E6756135-1E65-4D17-8576-610761398C3C} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
You also need to register the non-platform specific msdia140.dll in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\DIA SDK\bin\msdia140.dll" to fix that.
Compiled with VS2017 15.9.3 Enterprise edition using x64/AnyCPU. Registered "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\DIA SDK\bin\amd64\msdia140.dll". When I run the exe, it throws an error: