I get an error message:
Spatial types and functions are not available for this provider because the assembly "Microsoft.SqlServer.Types" version 10 or higher could not be found.
I get this error only on one of my development machines, and on the other it works correctly. Both machines have SQL Server 2014 on them, which should be enough, but apparently not. In addition, I installed the nuget package "Microsoft.SqlServer.Types" in the solution (I also tried it in several subordinate projects) and added the appropriate lines to load the corresponding DLL files:
Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
Debugging shows that the corresponding line is being executed and enters into it; it seems that the corresponding DLL files are loaded successfully.
The same computer that was used to start the project (a unit test) without errors. The error started to appear around the same time when I switched the test project to xUnit from MSTest, so it could very well be related to this.
Any suggestions for troubleshooting?
source
share