Closed ststeiger closed 1 year ago
I did a quick proof of concept using @ErikEJ's latest RC package (see https://github.com/ErikEJ/EntityFramework6PowerTools/issues/103) and using the SqlTypes 16 RC in a .NET 6 console app running on WSL and got a DbGeography written to a SQL database which would normally fail (with the could not load DLL error)
@stevetalkscode I decompiled the library and I still see a large amount of calls into native code for lots of spatial operations. The serialize/deserialize is all in managed code, so that should just work as you found. Try for instance calling BufferWithCurves
on WSL and I'll bet it'll fail.
It they were to target .NET6 instead of netstandard2.1, they could use the SupportedOSPlatformAttribute
to flag those set of methods as Windows-only.
@dotMorten But an Improvement on Windows where you got the error in the OP until now.
@stevetalkscode I decompiled the library and I still see a large amount of calls into native code for lots of spatial operations. The serialize/deserialize is all in managed code, so that should just work as you found. Try for instance calling
BufferWithCurves
on WSL and I'll bet it'll fail.It they were to target .NET6 instead of netstandard2.1, they could use the
SupportedOSPlatformAttribute
to flag those set of methods as Windows-only.
Fair point. I hadn't got as far as testing those bits yet.
Are there plans to update System.Data.SqlClient or will this only be supported in Microsoft.Data.SqlClient?
System.Data.SqlClient is in strict maintenance mode. It's not receiving any feature updates.
Is this actually complete? Last I checked this only works on x86 and x64 Windows, which isn't in the spirit of claiming .net core support. With .NET 6 running on mac, linux, ios and android, there's not really much benefit to this work until we have a proper crossplatform solution.
The nuget package explorer confirms it too with only runtimes supplied for 2 of the 3 Windows architectures and none for anything else:
It is in fact rather weird that the library claims to be netstandard2.1
instead of net5.0-windows
which is what it really is.
It is in fact rather weird that the library claims to be netstandard2.1 instead of net5.0-windows which is what it really is.
Haha, that's not weird, that's expected. Same old Microsoft. By the way, assuming you want polygons that can span accross the equator, it's not finished in x86 and x64, either. (or maybe not, i didn't test since last time i tested)
But I guess quick & dirty was cheapter than proper engineering. Now about filestream support on SQL-Server on Linux ... It's been 6 years since 2017 ... How long did they claim they have to port sql-server, two weeks ? I guess it all depends on what you understand under sql-server.
If you still haven't jumped ship to PostgreSQL/CockroachDB, you have nobody but yourselfs to blame.
Supporting only Windows is yet another example of why .NET fails to get some love on UNIXy platforms, marketing message is everything is cross platform in modern .NET, yet when we dive into the details there are hurdles like in this case.
@Wraith2 @cheenamalhotra Guys, is there any plans to support SqlGeometry/SqlGeography on Linux? I think lot of folks would like to know if its even planned..
I have no plans to contribute in this area. The sort of response above from @ststeiger illustrates why.
If someone else wanted to work on integrating @dotMorten 's open source geopgraphy stuff instead of relying on the closed source windows-only implementation that the sql server team (note: not the team that works on sql client and you see posting in this repo) maintains, then I'd be happy to help. I just have no need for the api personally and no need to expose myself to harmful toxicity.
@dmytro-gokun Have you tested on Linux and what is not working for you?
@ErikEJ Methods like STContains(), STArea() etc
@Wraith2 I understand.
I would be happy to help. The problem is that we would need access to that closed source in order to implement it in 100% compatible way. I guess, no one want STContains() which work differently on Windows & Linux. Do you think there is any chance we can get hold of that source code?
Do you think there is any chance we can get hold of that source code?
No
@ErikEJ I see. Then i do not think i will be able to help. Reverse engineering C code or trying to guess what exact algorithms were used is not my favorite passtime :)
Does MS at least plan to have this ported to Linux at some point? I guess it would be fair to let community know what to (not) expect.
Does MS at least plan to have this ported to Linux at some point?
It is my impression it is in their plans.
@dotMorten Would be really nice if someone from MS has actually confirmed or denied this :) @Kaur-Parminder Probably you could help here?
Is this actually complete? Last I checked this only works on x86 and x64 Windows, which isn't in the spirit of claiming .net core support. With .NET 6 running on mac, linux, ios and android, there's not really much benefit to this work until we have a proper crossplatform solution.
The nuget package explorer confirms it too with only runtimes supplied for 2 of the 3 Windows architectures and none for anything else:
It is in fact rather weird that the library claims to be
netstandard2.1
instead ofnet5.0-windows
which is what it really is.
The previous versions of sqlserver.types also had an "msvcr.dll" c++ runtime in these folders. Can anyone confirm if that is no longer needed? Thanks
Cannot run Microsoft.SqlServer.Types because \Microsoft.SqlServer.Server\IBinarySerialize.cs is missing in System.Data.
Since no source code is available, and contact owners on nuget yields a HTTP-500, I'm opening an issue here. I'd like to compute a polygon union...
And while you are at it, the version for the full .NET framwork (core also) should also work if SQL-Server is not installed on the machine that Microsoft.SqlServer.Types is executed on...