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

Netstandard conversion #367

Merged
merged 26 commits into from
Aug 25, 2017
Merged

Netstandard conversion #367

merged 26 commits into from
Aug 25, 2017

Conversation

PureWeen
Copy link
Collaborator

@PureWeen PureWeen commented Aug 2, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Convert project to new VS 2017 format and changed PCLs over to Netstandard

What is the current behavior? (You can also link to an open issue here)
Not being NetStandard

What is the new behavior (if this is a feature change)?
Being NetStandard

Does this PR introduce a breaking change?
No it's perfect in every way

Please check if the PR fulfills these requirements

Other information:

Not sure if there's a preferred way to merge this over. I can squash the whole thing and overwrite my history if that helps? Just let me know

@PureWeen PureWeen mentioned this pull request Aug 2, 2017
@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 2, 2017

On the AppVeyor side I'm not sure the best way I can be helpful there...

@olevett
Copy link
Member

olevett commented Aug 2, 2017

Might need the image set for AppVeyor, something like https://github.com/reactiveui/ReactiveUI/blob/nextversion-will-be-8/appveyor.yml#L3

@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 3, 2017

So for AppVeyor is the best process to just change the yml file and see what happens after I check in the file and the automated process runs? I was hoping for something a bit more direct but if that's how it goes I can start doing that and just using the RxUI one as a template

@olevett
Copy link
Member

olevett commented Aug 3, 2017

It's a little tedious!

You can also do something like https://www.appveyor.com/docs/how-to/rdp-to-build-worker/ which lets you check the state of the VM that's spun up for the build - it depends a bit on what the failure is as to whether that's useful!

build.cake Outdated
Copyright = "Copyright (c) Paul Betts"
});
});
Action<ICakeContext> testAction = tool => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if these tests ever get executed -> I don't think it should need wrapping in the Action (it's needed on RxUI to handle coverage I think)

…iers. Also changed over to using alpha bits in nuget for reactiveui
@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 3, 2017

Sounds good.. I just wanted to make sure that was the process before I started down the road of said process :-)

As far as unit tests in cake WHOOPS :-/

So what's the magic sauce to get the XUnit2 tests in cake to not throw this exception?

 System.IO.FileNotFoundException : Could not load file or assembly 'System.Reactive.Interfaces, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263' or one of its dependencies. The system cannot find the file specified.

I tried adding a binding redirect in app.config

 <dependentAssembly>
        <assemblyIdentity name="System.Reactive.Interfaces" publicKeyToken="94bc3704cddfc263" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.1000.0" />
      </dependentAssembly>

which actually fixed that exception in the VS test runner but the same exception still keeps showing up in Xunit

I've side by side compared with ReactiveUI and can't quite tell what sauce RxUI has that I'm missing. I tried rolling back to 1.9.2 but had the same issue

@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 3, 2017

hmm it works if I set

NoAppDomain = false

which is set to true on the Rx side

@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 3, 2017

Yay green check mark!!!!!

@cbrammer
Copy link

cbrammer commented Aug 6, 2017

I am very excited for this pull request @PureWeen! @olevett and @ghuntley what are your thoughts on releasing this as 6.x?

@dansiegel
Copy link

Any updates on this? I'd love to use the library but need NetStandard support...

@jsmarcus
Copy link

Definitely hoping this gets merged soon. Any ideas on a time frame?

@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 23, 2017

Should be soon. I went on an eclipse journey and will tie up loose ends early next week.

in the mean time the path to being released is basically
-merged in
-myget
-people test some
-release

That first and second thing don't really need to occur for the 3rd thing to still happen :-)

If you pull this PR down and run build.cmd the artifacts directory will have some nuget packages

Or download the packages from here
https://ci.appveyor.com/project/ghuntley/akavache/build/35.Branch.pull/367/merge.Sha.dd39800af6e052c5e6b082ef08bce89de43a7de7/artifacts

I have them running in some local projects and they seem to all work fine

@anaisbetts anaisbetts merged commit 883b2ae into reactiveui:develop Aug 25, 2017
@anaisbetts
Copy link
Member

@PureWeen This is a ton of great work, thanks for the PR

@PureWeen
Copy link
Collaborator Author

PureWeen commented Aug 26, 2017

YAY!!!!

Grab from myget everyone
https://www.myget.org/F/Akavache/api/v3/index.json
https://www.myget.org/F/akavache/api/v2

And let me know if you have any issues.

The only code changes really were integrating this
#369

Otherwise everything should just be the same and run the same :-)

@dansiegel
Copy link

@PureWeen your feed doesn't exist (at least not publicly)

@PureWeen
Copy link
Collaborator Author

@dansiegel try the v2 feed?

https://www.myget.org/F/akavache/api/v2

@PureWeen PureWeen deleted the netstandard branch August 29, 2017 17:18
@PureWeen PureWeen restored the netstandard branch August 29, 2017 17:18
@ghuntley
Copy link
Member

ghuntley commented Sep 3, 2017

Now available on NuGet.

https://twitter.com/GeoffreyHuntley/status/904293601349222400

@dansiegel
Copy link

it's worth mentioning here, as I'm sure someone will run into this... Akavache is using a different (and newer) SQLitePCLRaw package than certain other libraries like the Microsoft.Azure.Mobile.Client. The result is that there will be a version mismatch between the core and say bundle_green, which may result in System.TypeLoadException: VTable setup of type SQLitePCL.SQLite3Provider_sqlite3 failed. Since .NET Standard libraries really only handle the top level dependency i.e. Akavache, FooBarLibrary... the solution is to add the bundle_green SQLite package as a top level dependency matching the highest version.

@ghuntley great to see the official package out on GitHub!

@PureWeen
Copy link
Collaborator Author

PureWeen commented Sep 4, 2017

@dansiegel

This might help
https://github.com/ericsink/SQLitePCL.raw/wiki/Using-multiple-libraries-that-use-SQLitePCL.raw

Maybe locking down the bundle early and explicitly so all is consistent will fix that issue?

The Mobile.Client library
https://www.nuget.org/packages/Microsoft.Azure.Mobile.Client.SQLiteStore/

says it works with >= 1.1.2 so it seems like if 1.1.8 is just installed across all the projects and then whatever provider you want to use is initialized and frozen early then everything should be happy.

@dansiegel
Copy link

@PureWeen I’m aware as I solved the issue before posting... with newer .NET Standard projects you won’t see the mismatch unless you understand how libraries work, which most devs currently don’t. The solution of course is to manage the SQLiteRaw packages directly in your project so that you have matching versions. I would expect that this issue will be common enough that it will be helpful to document.

@PureWeen
Copy link
Collaborator Author

PureWeen commented Sep 4, 2017

@dansiegel aw ok good point... rereading I see now you were just pointing something out and not indicating a problem you are currently having 👍

@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants