DbGeography.FromText - Unable to load DLL 'SqlServerSpatial140.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

207 views Asked by At

enter image description here

I have tried to copy spatial140 from packages folder "\packages\Microsoft.SqlServer.Types...\nativeBinaries", in Visual Studio build is a success, not found some error.

But when run the project, I got that error.

2

There are 2 answers

2
Jiale Xue - MSFT On BEST ANSWER

Try to Change the status of spatial140.dll to Copy if newandContent.

enter image description here

1
Iqbal Fasyah On

I know this is bad, but I have solved the issues, must copy spatial140.dll to bin folder.