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

Update build for .NET Core SDK 2.0.0 #867

Closed
alexBraidwood opened this issue Sep 14, 2017 · 8 comments
Closed

Update build for .NET Core SDK 2.0.0 #867

alexBraidwood opened this issue Sep 14, 2017 · 8 comments

Comments

@alexBraidwood
Copy link

alexBraidwood commented Sep 14, 2017

While working on adding this for a personal project and feeling great about making a pull request, I noticed there's an extension method collision for .net standard 2.0.

SequenceExtensions.Append (no docs?) is colliding with a shiny new gift from Microsoft: System.Linq.Enumerable.Append.

I thought this is likely used across projects and was worried about pressing forward with a breaking name change. I added conditional compilation symbols and a quick google of the repo didn't reveal any additional usages, so I carried on.

Here's the commit, currently: alexBraidwood@7fe8feb

@tillig
Copy link
Member

tillig commented Sep 14, 2017

We're currently building against .NET SDK 1.1.0 but when the time comes this will be a good reminder of one of the things we may need to address.

No docs on that method because it's internal - you shouldn't be consuming it from outside the system and we haven't kept docs on every internal and private method.

@tillig
Copy link
Member

tillig commented Sep 14, 2017

Note we'll still try to target a lower version of netstandard than 2.0 to maintain a larger compatibility, but we could definitely update the SDK version.

@tillig tillig changed the title Adding .Net Standard / Core 2.0 build support Update build for .NET Core SDK 2.0.0 Sep 14, 2017
@alexBraidwood
Copy link
Author

Ah, I see. I can just update the name of the extension method, then.

Forgot to note: I left netstandard 1.1.0 in-tact with the commit. All three seemed to build out just fine with the powershell script. I can certainly put up a pull request for this or wait until this is on the roadmap. Also, Array.Empty<T> was another changeover for net46 and netstandard2.0.

@hawkerm
Copy link

hawkerm commented Sep 15, 2017

The Autofac website talks about .NET Core, but will it just run on .NET Standard or is that work still being done?

@tillig
Copy link
Member

tillig commented Sep 15, 2017

@hawkerm Have you tried it or looked at the code?

@alexBraidwood
Copy link
Author

@hawkerm .NET Standard <= 1.1 should work fine with the current nuget package.

Sorry if this is redirecting the discussion of the enhancement, but as far as the difference between netstandard and netcore goes: netstandard is a formal api standard for .Net and netcore is an implementation of netstandard. If something supports netcore, it should then support netstandard. netcore is not netframework, though they are both netstandard compliant. netcore and netframework have additional libraries beyond netstandard that make them incompatible. At least, that's my understanding.

See: a Stackoverflow response on the matter.

@hawkerm
Copy link

hawkerm commented Sep 19, 2017

@alexBraidwood yes .NET core is an implementation of the standard, but for support it's the other way around.

If something supports netcore, it should then support netstandard.

If you build for netcore then it's running on netstandard but that doesn't mean it'll run elsewhere vs. if you build for netstandard it will work in netcore and elsewhere. As building towards netstandard is what puts the limitation in the compiler to ensure you're not using those extra netcore or netframework features.

That's just why I was asking more explicitly as the Autofac site called out .NET core vs. .NET standard, but it looks like they're targeting standard 1.1 as @tillig called out.

@tillig
Copy link
Member

tillig commented Dec 14, 2017

OK, the dotnet SDK being targeted during build is now 2.1.2; VS 15.5.2 should work; and I renamed the Append extension to AppendItem so if/when we do end up targeting netstandard2.0 we won't have to revisit it. I think that about does it here. Thanks, all!

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

No branches or pull requests

3 participants