Breeze / breeze.js

Breeze for JavaScript clients
MIT License
540 stars 88 forks source link

typo in nuspec breaks ASPNET5 #90

Open cherrydev opened 9 years ago

cherrydev commented 9 years ago

The new ASPNET5 nuget tools are case sensitive, presumably to better support case-sensitive filesystems. The .nuspec incorrectly specifies the Newtonsoft.Json as NewtonSoft.Json. Because of this, Breeze.Server.ContextProvider can't be resolved in an ASPNET5 project.

(Incidentally, this typo seems to be extremely common and affects other packages)

wardbell commented 9 years ago

That IS annoying.

I've updated the nuspec for next time. But I haven't updated the deployed package yet, mostly because we have been trying to keep these particular nuget package version numbers in-sync with the Breeze release version (so far).

Now I could force that issue. But why bother? I'm not even sure that Breeze.Server.ContextProvider would work at all with ASPNET5, given how much has changed there. I rather doubt the Web API packages will work.

ASPNET5 is a preview ... and we haven't caught up to it yet.

So, tell me, why is this an issue for you at this moment in time? I am very curious.

cherrydev commented 9 years ago

Oh, I bring this up specifically because I'm using EF6 and Breeze.Server.ContextProvider in an ASPNET5 application currently in development. It works just fine. Pending full OData support for the new WebAPI version, I've just written a WebAPI filter using LinqToQuerystring that get query strings working just nicely.

The only real pain-point was getting migrations working for EF6 in an ASPNET5 project since the PowerShell scripts are really brittle. I worked around that by making replacement Commands that do the migrations.

Remember that (one of) the CLR for ASPNET5 is just vanilla .NET CLR with some additions, and shouldn't be confused the the new CoreCLR 5.0 which is the new portable runtime. The ASPNET5 frameworks and new libraries (WebAPI, EF7 et all) are compatible with the new, more limited CoreCLR5, but you can still write code that uses the vanilla .NET CLR.

Incidentally, I DID make a start on an EF6 ContextProvider before I dropped EF7 support, since it won't have feature-parity with EF6 at the time that ASPNET5 is released. The HUGE change in EF7 that will have major effects on Breeze.Server will be that it drops EDM as its internal data model in favour of a new, lightweight metadata model that isn't encumbered with the legacy of ADO.NET.

If you could update the deployed package, you'll save one small team of .NET pioneers from having to manually edit their .nuspec files, thanks!

wardbell commented 9 years ago

I hear you about sparing you pain. We should have a new Breeze release soon and then it will be fixed. Sorry for the wait.

Why do you think dropping the EDM "will have major effects on Breeze.Server". It shouldn't have much of an effect at all. Maybe I've forgotten something but I didn't think the server made use of EF metadata. Did I forget something?

cherrydev commented 9 years ago

Doesn't the EF6 ContextProvider generate the metadata by writing the EDMX from the DbContext, fixing it up a little bit and then converting it to JSON?

wardbell commented 9 years ago

Yes it does. And I'm not yet sure how to extract the equivalent information that EF must be using internally so we can generate breeze metadata from that. It's on my todo list.

But server side metadata generation is a nice to have (really nice), not a necessity. Manual metadata creation is not too taxing.

It was for THIS reason that I felt there is not a MAJOR issue here; others may vale it differently. To your point, metadata generation is an important unknown.

cherrydev commented 9 years ago

Yep, I agree, server-side metadata generation is a nice-to-have, not a necessity. Beside that, I think porting ContextProvider to EF7 will eventually be rather simple.

doczoidberg commented 9 years ago

@wardbell do you have any plans for testing Breeeze with EF7? Do we need to wait till November (ASP.NET 5 & EF7 go live date)? Breeze is the only reason I can't already use ASP.NET 5 (EF7).

cherrydev commented 9 years ago

Remember Breeze also relies on OData, which is a separate project from EF7 and MVC. That project is currently in the earlier phases of being ported to EF7 and MVC. I believe they just released their first Alpha build.

doczoidberg commented 9 years ago

OData is supported for ASP.NET 5? https://github.com/OData/WebApi/issues/229

I just installed breeze to my new asp.net 5 project via nuget (without problems) but the namespace is not found when I want to compile the project.

wardbell commented 9 years ago

We DO have plans to offer ASP.NET 5 support with MVC 6 and EF 7 and on .NET CORE too.

FWIW, I have a prototype of a Breeze client talking to MVC6/EF7. But it does so with JS artifacts only. Haven't tried very hard to write the C# server-side support.

The metadata generation will be easier than I first thought as the EF7 metadata is much more sane and accessible.

I do not have a timeline. I would hope we have something before November but I can't promise right now.

doczoidberg commented 9 years ago

great to hear