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

.NET Core SDK 2.0 is supported or will be? #76

Closed
ryukinix opened this issue Aug 6, 2017 · 21 comments
Closed

.NET Core SDK 2.0 is supported or will be? #76

ryukinix opened this issue Aug 6, 2017 · 21 comments

Comments

@ryukinix
Copy link

ryukinix commented Aug 6, 2017

Description

For now the README.md seems to point that Giraffe is design to build on top of the lastest released SDK, which for now is the SDK 1.0 and runtime 1.1. I tried, naively build the provided template with the SDK 2.0.0 preview 2 and doesn't works. So, for now, this is the expected, right?

But you have plans to support SDK 2.0.0 before release too? Or only after the official release?

Thanks anyway for that great web framework!

System/SDK version

Just for completeness sake, I'll add my current version info from dotnet --info

❯ dotnet --info
.NET Command Line Tools (2.0.0-preview2-006497)

Product Information:
 Version:            2.0.0-preview2-006497
 Commit SHA-1 hash:  06a2093335

Runtime Environment:
 OS Name:     manjaro
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /opt/dotnet/sdk/2.0.0-preview2-006497/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-25407-01
  Build    : 40c565230930ead58a50719c0ec799df77bddee9
@ryukinix ryukinix changed the title .NET Core SDK 2.0.0 preview 2 is supported or will be? .NET Core SDK 2.0 is supported or will be? Aug 6, 2017
@dustinmoris
Copy link
Member

dustinmoris commented Aug 6, 2017

Hi, Yes I definitely plan to support .NET Core 2.0, but I haven't had time to play with preview 2 yet. From previous experience I thought it might be better to wait for the final RTM, because they often changed quite a few bits very last minute and I don't want to migrate the library multiple times, but if the support for .NET Core preview 2 is much desired then I can definitely work on it and release pre-release of Giraffe on that version too.

@ryukinix
Copy link
Author

ryukinix commented Aug 7, 2017

Good to hear it, @dustinmoris! Awesome job.

I'll be watching your progress.

I'm very excited about .NET Core 2.0, seems they improved a lot and fixed annoying bugs (which I suffer on some cases, like the wrong f# templates for console apps and others things). Another thing I expect is, but I don't have sure, If they will release support for Linux x86.

@Banashek
Copy link
Contributor

Banashek commented Aug 13, 2017

Looks like aspnetcore 2.0.0 was released on nuget.

I assume the cli tools will be released soon as well.

Looks like there might be a bit of time between the core 2.0 change and giraffe getting updated. There are quite a few dependencies that will need to hit 2.0 (FSharp.Core, FSharp.NET.Sdk) according to the compatibility matrix found here.

The way I interpret the matrix (though I could be wrong) is that all dependencies will need to be netstandard 2.0 compatible for a project to itself be 2.0 compatible.

@dustinmoris
Copy link
Member

Thanks, weird I didn't see any official announcements of ASP.NET Core 2.0 yet, but you're right... it's been out for 3 days now! I actually also didn't think that netstandard2.0 is a new netstandard rather then a continuation of the previous one. This breaks the whole concept of netstandard, that when you target a lower version it will always work on a platform which supports a higher version. I am really confused... I don't understand why adding more APIs to netstandard2.0 stops compatibility with the old standards... anyway... given that this is the case I will indeed have to wait for all other dependencies to update first.

@Banashek
Copy link
Contributor

Yeah I pulled down the repo and just started shoving 2.0 dependencies at it. The first thing I noticed was an f# compiler error, which is when I stopped. I think that will be the only thing that will need to be waited on.

Aspnet stuff -> 2.0
System stuff -> 2.0
Json -> not yet

though i'm not sure how much these matter

Since 2.0 is a superset with no breaking changes I feel like it should be attemptable.

Every time I think I understand this stuff I look into it and something like "we don't need to do semver because we feel it's a big change" happens.

Anyhoo, If I have some time I'll look into the F# issue (it was an error about multiple imports of System.Runtime on compilation) and see if I can't sort it out.

@dustinmoris
Copy link
Member

nice... let me know how you get on with it and if you want me to help with something, otherwise I'll just wait for the PR :D

@Banashek
Copy link
Contributor

Banashek commented Aug 15, 2017

So I got the projects building with these changes, but am running into all sorts of weird nuget-type errors.

I was at it for a while and got down pretty far the nuget/netcore rabbit hole.

Decided to take a step back and see if everything worked minimally.

I made a copy project with minimal dependencies to see if it would work. It seems to work, but this is just targeting netcore and I only tested the simple application (which uses some giraffe features like XmlViewEngine, Middleware, and HttpHandlers).

Somewhere between these two repos is the answer lol.

Figured I'd put the information here for reference.

@ryukinix
Copy link
Author

FYI, .NET Core 2.0 was released two days ago!

@Banashek
Copy link
Contributor

Yeah it's pretty exciting. I made sure to install it before starting on any of the porting work. I've got the partial working solution in the copy project repo I made. It's stripped down to only the necessary bits to get giraffe working on dotnet core, but doesn't include any of the CI or net461 parts. I'll look at it a bit more today.

@Banashek
Copy link
Contributor

Got passed all the weird runtime issues. Everything is building and tests are passing. I just need to fix up the samples and I should have a PR in today.

image

@Banashek
Copy link
Contributor

Banashek commented Aug 18, 2017

error NU1202: Package Microsoft.AspNetCore 2.0.0 is not compatible with net46

I've got everything tested under netstandard2.0

Not sure if everything will work with the net46 dependency

@dustinmoris thoughts?

Some info:
dotnet/aspnetcore#2022
https://github.com/dotnet/standard/blob/master/docs/versions.md

@Banashek
Copy link
Contributor

Additionally, I don't think I'll be able to test 461 (which should be compatible if you want to bump it) on my mac. It could be set up in docker, but I don't think I have the time to set that up at the moment.

@Banashek
Copy link
Contributor

So I've got everything working targeting netstandard2.0/netcore2.0 here except for the samples.

The SampleApp has the following error:
image

And the IdentityApp has errors to do with wherever all the identity stuff got moved to, but it shouldn't be too much work to translate it over.

I don't know if I'll be able to actually get to that stuff this weekend (just got booked for meetings, and then will be away from the computer), but I've checked in 90% of what needs to be done in my repo.

Let me know if you'd like that PR'd into a netcore2.0 branch or something where the last 10% can be finished up.

@dustinmoris
Copy link
Member

dustinmoris commented Aug 19, 2017

Hi I just created a netstandard20 branch. Feel free to submit the PR and I will merge it in there and finish the last 10% :)

@NinoFloris
Copy link
Member

Any easy way to consume it for now?

@dustinmoris
Copy link
Member

Hi @NinoFloris I aim to work on the 2.0 branch this weekend and hopefully have a new pre-release package ready by then which you can consume. I'll keep you posted here...

@dustinmoris
Copy link
Member

dustinmoris commented Aug 26, 2017

Hey, I am going through your changes and targeting 461 all works too, so might have a new release ready tonight or tomorrow. There's one thing though which I am surprised and I would like to understand better. How come all the projects build now without FSharp.Core and FSharp.NET.Sdk??

@NinoFloris
Copy link
Member

NinoFloris commented Aug 26, 2017 via email

@dustinmoris
Copy link
Member

Nice, that's great, thanks!

@dustinmoris
Copy link
Member

Just released all packages with the upgrade to netstandard2.0 and net461. Enjoy!

@JonCanning
Copy link
Contributor

🎉

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

No branches or pull requests

5 participants