dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.43k stars 10.01k forks source link

Change projects to target netcoreapp3.0 #3754

Closed natemcmaster closed 5 years ago

natemcmaster commented 6 years ago

As a part of only supporting .NET Core, we can change most projects to target netcoreapp3.0 instead of netstandard2.0. This change applies to test projects, which no longer need to cross-target .NET Framework.

See https://github.com/aspnet/Announcements/issues/324

Remaining feature areas (I likely missed a few here, keep adding them ~Chris):

natemcmaster commented 6 years ago

I want to emphasize the "most" part of the original post. Some libraries, like the SignalR .NET client, must continue to target .NET Standard when the library is intended for use on other .NET runtimes like Xamarin and UWP. This decision is being made on a case-by-base basis. We should finish going through our list of assemblies and post the decisions to clarify exactly which assemblies should change to netcoreapp3.0-only.

bdominguez commented 6 years ago

What about WPF applications that host asp net core? It will no longer be possible to do this.

khellang commented 6 years ago

What about WPF applications that host asp net core?

Just port it over to .NET Core? 😉 https://blogs.msdn.microsoft.com/dotnet/2018/10/04/update-on-net-core-3-0-and-net-framework-4-8/

natemcmaster commented 6 years ago

@khellang is correct, WPF and AspNetCore can be used together. A WPF app will be able to set TargetFramework to netcoreapp3.0 and also have a FrameworkReference to Microsoft.AspNetCore.App.

benaadams commented 5 years ago

What about WPF applications that host asp net core? It will no longer be possible to do this.

And if you don't want to port your WPF to .NET Core (though you should 😉) you can keep using ASP.NET Core 2.1 https://github.com/aspnet/AspNetCore/issues/3753#issuecomment-438046364

In order to give customers a reasonable stepping stone on their path to migrating applications to ASP.NET Core on .NET Core, we are going to extend support and servicing for ASP.NET Core 2.1.x on .NET Framework to match the current support policy for the other package-based ASP.NET frameworks, e.g. MVC 5.x, Web API 2.x, SignalR 2.x. This effectively means the ASP.NET Core 2.1.x related packages (final detailed list TBD) will be supported indefinitely, beyond the 3 year LTS period for the .NET Core 2.1 train overall.

natemcmaster commented 5 years ago

@dougbu here are some known exceptions to what changes to netcoreapp3.0: https://github.com/aspnet/AspNetCore/blob/9e73c3382f4d9e6ba47afff6a1467ace945c77e7/build/SharedFrameworkOnly.props#L12-L20

dougbu commented 5 years ago

/cc @Tratcher

Tratcher commented 5 years ago

Session: https://github.com/aspnet/Session/commit/abbdfb72ef54a77623c01d517c85eb8b28c70bc0

Tratcher commented 5 years ago

@natemcmaster DataProtection is getting upgraded, right? What about the net461 package Microsoft.AspNetCore.DataProtection.SystemWeb?

natemcmaster commented 5 years ago

Yes, we can update DataProtection to netcoreapp3.0. Projects which were .NET Framework-only and have a dependency on ASP.NEt Core can be removed. For 3.0, I believe that includes

Tratcher commented 5 years ago

@rynowak Passing this off to you for HTML and Razor.

dougbu commented 5 years ago

Many thanks for all your work on this @Tratcher!

rynowak commented 5 years ago

Done for Html and Razor. @Tratcher - is this totally done now?

Tratcher commented 5 years ago

Still waiting for a final review on https://github.com/aspnet/AspNetCore/issues/3754, but otherwise I think so.

Doug, want to do a final verification on the package artifacts to see if all the TFMs are what we expect them to be?

dougbu commented 5 years ago

@Tratcher sure, I'll have a look-see.

But, #3754 is this issue. What PR hasn't been reviewed?

Tratcher commented 5 years ago

Woops, I meant #4625. It just went in this morning.

dougbu commented 5 years ago

A few projects aren't mentioned above as hold-outs and haven't been touched:. @Tratcher I haven't checked the PRs for comments on these. Do you recall if any can now be updated?

All please check off those that are fine as-is and please add resoning:

Can change to netcoreapp3.0

Resolved

These are intentionally targeting netstandard

Tratcher commented 5 years ago

Microsoft.Web.Xdt.Extensions isn't changing. It's part of the Azure deployment infrastructure and only runs on net461.

Tratcher commented 5 years ago

Microsoft.Owin.Security.Interop.Test is disabled for now and needs to be re-written. It tests a bridge scenario between core and katana.

Tratcher commented 5 years ago

@pakrym to comment on site extension infrastructure and ANCM packages.

pakrym commented 5 years ago

TFM shouldn't matter in site extension projects, but I would prefer keeping them as is because Nuget version used by AppServices is very old and I don't want surprises.

dougbu commented 5 years ago

@natemcmaster can src\PackageArchive\ZipManifestGenerator be updated?

dougbu commented 5 years ago

@joeloff @jkotalik what are your thoughts on the src/Installers/Windows/** projects?

joeloff commented 5 years ago

Don't think it matters for setup projects. These build using WiX - they just consume other build outputs

dougbu commented 5 years ago

@rynowak I seem to remember you commenting on JsonPatch recently. Is it intentionally not targeting netcoreapp3.0?

SteveSandersonMS commented 5 years ago

Anything that needs to run on WebAssembly has to be netstandard. Hence the particular subset of Components projects that target netstandard2.0.


From: Doug Bunting notifications@github.com Sent: Friday, December 14, 2018 8:15:29 PM To: aspnet/AspNetCore Cc: Steve Sanderson; Mention Subject: Re: [aspnet/AspNetCore] Change projects to target netcoreapp3.0 (#3754)

@rynowakhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frynowak&data=02%7C01%7CSteve.Sanderson%40microsoft.com%7C5944e8988d224995e89d08d66200e4ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636804153318035506&sdata=ZhHdbFi4z%2BvIPhVO93kWfFsmu4%2FaQZhRbQcLhvXV6uE%3D&reserved=0 I seem to remember you commenting on JsonPatch recently. Is it intentionally not targeting netcoreapp3.0?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faspnet%2FAspNetCore%2Fissues%2F3754%23issuecomment-447442802&data=02%7C01%7CSteve.Sanderson%40microsoft.com%7C5944e8988d224995e89d08d66200e4ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636804153318045518&sdata=Bj%2ByfM%2FmaxM9AZMdoGZn2tKVLok0xT2c7tNO8GfZHwY%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABDOMuy-1Ic6kwnaWQ_ezwA8OmSIKzk5ks5u5AbhgaJpZM4YAsNI&data=02%7C01%7CSteve.Sanderson%40microsoft.com%7C5944e8988d224995e89d08d66200e4ea%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636804153318055523&sdata=Ry7XdidS0wbbZ5CHjC8xEkW%2BRnVbL22WOW2lgQ%2BeAAA%3D&reserved=0.

dougbu commented 5 years ago

@SteveSandersonMS your email responded to a message about JsonPatch. Is that used in projects that target WebAssembly too?

natemcmaster commented 5 years ago

Btw, I'm updating Doug's check list above. Yes, ZipManifestGenerator could be updated, but it doesn't really matter. It's a developer tool for this repo only. We don't re-distribute.

dougbu commented 5 years ago

I double-checked the src/Identity test projects and they're fine, controlled by src\Identity\test\Directory.Build.props

SteveSandersonMS commented 5 years ago

My intent was to reply to the thread as a whole. No, JsonPatch is not used by default on WebAssembly.


From: Nate McMaster notifications@github.com Sent: Friday, December 14, 2018 8:21:15 PM To: aspnet/AspNetCore Cc: Steve Sanderson; Mention Subject: Re: [aspnet/AspNetCore] Change projects to target netcoreapp3.0 (#3754)

Btw, I'm updating Doug's check list above. Yes, ZipManifestGenerator could be updated, but it doesn't really matter. It's a developer tool for this repo only. We don't re-distribute.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faspnet%2FAspNetCore%2Fissues%2F3754%23issuecomment-447454236&data=02%7C01%7CSteve.Sanderson%40microsoft.com%7Cd194bfabaeb649f9d94c08d66201b308%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636804156774125556&sdata=7Oi3UnDD6Y%2FwTcifqkaTJiUgMYGaxaRwDv%2Fi0sMcckI%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABDOMkiY0P-eUCaaeJYjMeQxc6aXU8vtks5u5Ag7gaJpZM4YAsNI&data=02%7C01%7CSteve.Sanderson%40microsoft.com%7Cd194bfabaeb649f9d94c08d66201b308%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636804156774125556&sdata=ViHWj1gju%2FTN1Jcofp%2B%2FCeclURu2AWTjVYNhtccXKKg%3D&reserved=0.

dougbu commented 5 years ago

@Tratcher was Microsoft.AspNetCore.Connections.Abstractions.csproj left out of #4405 on purpose?

rynowak commented 5 years ago

JsonPatch should change to netcoreapp3.0.

Components stuff can be left alone. We'll be doing more surgery there soon, and much of it will be ns2.0 forever

rynowak commented 5 years ago

Precompilation can be deleted.

Tratcher commented 5 years ago

@natemcmaster wasn't SignalR client going to need Microsoft.AspNetCore.Connections.Abstractions.csproj transitively?

dougbu commented 5 years ago

Actions so far:

natemcmaster commented 5 years ago

@Tratcher yes, Microsoft.AspNetCore.Connections.Abstractions is intentionally netstandard2.0. I updated the checklist.

dougbu commented 5 years ago

@pranavkm that leaves just Microsoft.AspNetCore.Mvc.Analyzers.csproj and Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj. Must the analyzers target netstandard1.3?

dougbu commented 5 years ago

FYI I'll take the remaining few actions

dougbu commented 5 years ago

PRs #5124 and #5128 address known TODOs

dougbu commented 5 years ago

5124 closed with 826f950530

dougbu commented 5 years ago

Last bit done in e717a8443e

dougbu commented 5 years ago

Actually, @pranavkm should the analysers be converted to target netcoreapp3.0?

natemcmaster commented 5 years ago

I believe analyzers should target netstandard2.0, since csc runs on both framework (in VS) and core (everywhere else).