Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add base .net core support for xplatform/linux use #26

Merged
merged 4 commits into from
May 18, 2020

Conversation

bgwdotdev
Copy link
Contributor

Hey, I am beginning to work on supporting .net core for linux use. Noted you were looking for help on this.

Currently still testing and developing this though it partially works at the moment. Will continue working on this over the next while to get it up to quality but if anyone wants to help along the way, it is always welcome.

Connecting and invoking create/insert queries seem to work alright so far. Errors with output due to the [DBNullScrubber] but will hopefully get this fixed and further testing done soon.

Thanks

@RamblingCookieMonster
Copy link
Owner

Hiyo! I'm sloooow sorry! Which binaries did you grab? It's silly, but for binaries I'd like to either grab fresh or just check the sha1. Other than that, if it works on core, works for me - thanks!

@bgwdotdev
Copy link
Contributor Author

Hey, no problem at all, thanks for all your hard work!

I knew I should have documented this down when I was figuring out what binaries to pull...

If I remember correctly, I used the System.Data.SQLite.dll from the sqlite-netStandard20-binary-1.0.110.0 from .Net Core 2.0 section here:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

For the System.Interop.dll, I used the Setup/compile-interop-assemlby-release.sh from the source code zip sqlite-netFx-source-1.0.110.0 at the top of the page on that site, find the .dll in bin/2013/Release/bin/SQLite.Interop.dll

Might be worthwhile grabbing the new 1.0.111.0 ones rather than using mine anyway. And maybe worthwhile updating the old .net framework ones as they are missing newer sqlite features like upsert

Hope this makes sense, any questions let me know.

Thanks again.

@ravensorb
Copy link

Thought I would check in and see if this might be merged soon?

@MKletz
Copy link

MKletz commented Mar 10, 2020

@RamblingCookieMonster any chance we can revisit this PR? Trying to get this working on PS 7

@bgwdotdev
Copy link
Contributor Author

@MKletz are you having issues running my PR under PS7? If so, I can probably fix it over the weekend.

@RamblingCookieMonster If it would help, I think I could write an update function that will pull/build the latest .dll from source, to avoid having to trust my or any others binaries.

@MKletz
Copy link

MKletz commented Mar 13, 2020

@fffnite actually no, I just assumed based on the OP for the PR but this appears broken under PS 7. Production release is only broken for -As PSObject your PR appears broken for all.
image

@bgwdotdev
Copy link
Contributor Author

Thanks for the debug, it seems to be working fine on linux for me under ps7 but I'll boot up a windows machine and see if I can replicate your issue.

@bgwdotdev
Copy link
Contributor Author

@MKletz Alright, foolishly did not realise the sqlite .dlls are platform specific. I have now updated the repo with files for linux, windows (32 & 64) and macos under powershell core and tested it on windows with no errors. Let me know how you get on.

@bgwdotdev
Copy link
Contributor Author

@RamblingCookieMonster I have added a function to pull and import the files directly sqlite's nuget repo. If have pre-added it for all the platforms but for security you can feel free to re-download the .dlls yourself with the function: `update-sqlite -os win-x64'

You can specify the version in there as well to make it easy to update in future.

The function may not be up to the doc and formatting quality you'd prefer but I can do some tidying and such if you have a preferred style.

@MKletz
Copy link

MKletz commented Mar 16, 2020

@fffnite I just pulled down your latest code and had no issues with -As Psobject or -As datarow on Windows PS 7

@bgwdotdev
Copy link
Contributor Author

@MKletz Great, have fun & happy coding! let me know if anything else crops up and I'll happily take a look :)

@RamblingCookieMonster
Copy link
Owner

This is awesome! Will try to find time to poke around and merge this weekend, sorry for being so slow!

@MKletz
Copy link

MKletz commented Apr 13, 2020

@RamblingCookieMonster any chance you had a moment to review? Sorry for the pestering!

@MKletz
Copy link

MKletz commented May 6, 2020

@RamblingCookieMonster bump

@RamblingCookieMonster
Copy link
Owner

oy this build stuff is old and janky af. going to merge, hopefully nothing will break, and manually publish. Thanks for all the work and being incredibly patient!

@RamblingCookieMonster RamblingCookieMonster merged commit a1350f1 into RamblingCookieMonster:master May 18, 2020
@RamblingCookieMonster
Copy link
Owner

Wheeee it's published, I think - like me know if v1.1.0 from gallery works as expected - thanks again : D

@MKletz
Copy link

MKletz commented May 18, 2020

This made my morning thank you. All appears to be working and I can officially run my module on Linux that used this :D

@BroVic
Copy link

BroVic commented Jun 26, 2020

Thanks. Will try this out on Windows.

@BroVic
Copy link

BroVic commented Jun 26, 2020

Bam! And it works! TY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants