NationalAssociationOfRealtors / libRETS

libRETS is RETS client library written in C++ that allows rapid development of RETS client applications. By saving the developer from dealing with the RETS protocol details, the application writer can concentrate on their application, saving them time and money in the process
Other
107 stars 59 forks source link

Error after update to 1.6.3 #87

Closed Gr84DarkMoon closed 4 years ago

Gr84DarkMoon commented 4 years ago

The type initializer for 'librets.libretsPINVOKE' threw an exception. at librets.libretsPINVOKE.RetsSession_MODE_CACHE_get() at librets.RetsSession..cctor()

(Confirmed 32bit dll's, confirmed application is running in 32bit mode) Windows 7SP1

Previous .NET 2.0 versions worked fine.

zBestData commented 4 years ago

LibRets is not being supported as it once was and some MLS's have started implementing it's replacement called MATRIX. Version 1.6.3 was released a year ago and most likely compiled using Windows 10 and .Net4.x. Both Win 7 and 8, as well as .Net 2.0 have also been deprecated and most likely the cause of your issue. My recommendation would be to upgrade and try again.

Gr84DarkMoon commented 4 years ago

Thanks for the feedback. Unfortunately, forcing all of our customer to update is not an option, no do I think it would solve the problem. Some windows boxes (including windows 7-10) work just fine, others fail with the above error.

What version of the .NET Framework was used. Is there a C++ runtime library I need? Any dependence I can check for. We literally have hundreds of customers we are supporting with this library and need to find a solution. Any help/information you can provide with be greatly appreciated.

dakipmyster commented 4 years ago

@Gr84DarkMoon If its an issue I've seen with our users, there is a dependency to the 2015-2019 c++ x86 redist with librets-pinvoke.dll

bryanjebyrd commented 4 years ago

@dakipmyster What specific dependency did you have to use to fix this error that @Gr84DarkMoon is seeing?

bryanjebyrd commented 4 years ago

For any future visitors with this issue, we resolved our issue by installing the Visual C++ Redistributable modules. They can be downloaded here https://www.microsoft.com/en-us/download/details.aspx?id=48145

cinnaman commented 4 years ago

Thanks @bryanjebyrd that C++ Redistribution package is what I needed to get librets v1.6.3 x64 P/Invoke assembly to load on a 2016 server.

Gr84DarkMoon commented 4 years ago

Installing the appropriate Visual C++ Redistributable for Visual Studio 2015 worked. Be sure to install the redistributable that matches the libRets bitness (64bit 32bit).