Skip to content

Upgrade to .netstandard 2.0, asp.net core 2.0, entity framework core 2.0 and asp.net core identity 2.0 #2406

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

Closed
9 tasks done
hikalkan opened this issue Aug 12, 2017 · 42 comments

Comments

@hikalkan
Copy link
Member

hikalkan commented Aug 12, 2017

TODO

Problems to Solve

About Breaking Changes

This is a breaking change because the libraries above have breaking changes.

In addition, ABP supports .net framework 4.6 and .net standard 1.6 now (multiple targeting). We will move to .net standard 2.0 (single target). That means .net framework 4.6 will no be supported and upgraded to 4.6.1.

We will release ABP v3.0. While these breaking changes does not effect applications much, it will be good to indicate that we changed the .net framework dependency and upgraded major libraries.

@hikalkan hikalkan added this to the v2.4 milestone Aug 12, 2017
@viewtance
Copy link

Exciting upgrade, look forward to use .net core 2.0 for a long time, is there a schedule to release v2.4?

@fileman
Copy link

fileman commented Aug 13, 2017

since EF Core 2.0 has global filter you plan to replace EF.DynamicFilter with built-in filter?

@hikalkan
Copy link
Member Author

No schedule. This is a high priority item we will work in the next days.

We will try to implement EF Core 2.0 filters, sure. But it's not a replacement of EF.DynamicFilter because EF.DynamicFilter is for EF 6.x, not for EF Core.

@hikalkan
Copy link
Member Author

.net core 2.0 runtime/sdk not released yet: dotnet/aspnetcore#2125 (comment)
So, we should wait for it before upgrading packages. Even Microsoft has not officially announced asp.net core 2.0 as you can see.

@acjh
Copy link
Contributor

acjh commented Aug 14, 2017

For reference:

@hikalkan
Copy link
Member Author

Thank you @acjh we were just waiting for it :)

@sebitsi
Copy link

sebitsi commented Aug 15, 2017

@viewtance
Copy link

viewtance commented Aug 15, 2017

@hikalkan How about your upgrade progress? We want to use .net core 2.0 based on ABP, it seems EF core and AspNetCore Identity with some breaking changes, are you working on these changes?

@badre429
Copy link
Contributor

It will be great if you add first class support for identityserver4

@tuvshuu
Copy link

tuvshuu commented Aug 17, 2017

When you think upgrade to .net core 2.0 ?

@hikalkan
Copy link
Member Author

We are working on it. We think to finish As Soon As Possible. (See the progress: https://github.com/aspnetboilerplate/aspnetboilerplate/tree/netstandard2.0)

@hikalkan hikalkan changed the title Upgrade to .netstandard 2.0, asp.net core 2.0 and entity framework core 2.0 Upgrade to .netstandard 2.0, asp.net core 2.0, entity framework core 2.0 and asp.net core identity 2.0 Aug 17, 2017
@tuvshuu
Copy link

tuvshuu commented Aug 17, 2017

Wow great job can't wait to get it work :)

@viewtance
Copy link

@hikalkan what is the upgrade progress, a little time not see the update on this issue

@tuvshuu
Copy link

tuvshuu commented Aug 22, 2017

Are you going to update template core 1.x to 2.0 ? if so when you think please ?

@hikalkan
Copy link
Member Author

@tuvshuu created a branch for it: https://github.com/aspnetboilerplate/module-zero-core-template/tree/netcore2.0-2

@hikalkan
Copy link
Member Author

@viewtance I'm working on new EF Core 2.0 Global Filter feature. It has some problems gets my time (dotnet/efcore#9502). It does not support to define more than one filter and enable/disable them one by one. That means if you disable multitenancy filter you will disable soft delete filter too. That's not what we can accept. If I can not find a proper way, we will not use this feature for now.

The second problem is .net standard 2.0 support is not available for IdentityServer4 yet: DuendeArchive/IdentityServer4#1055 We can ignore this package and release others for now. But since AspNet Zero depends on IdentityServer4 we should wait AspNet Zero for it.

@viewtance
Copy link

@hikalkan Thanks for your feedback, it seems still no response from EF core team for dotnet/efcore#9502, it is fine if no proper way, we can still use current approach (current customized filter doesn't work for navigation properties, right?)

For the second problem, maybe we need to wait it, since we are using AspNet Zero now, we want to use .Net Core 2.0 based on AspNet Zero.

@hikalkan
Copy link
Member Author

current customized filter doesn't work for navigation properties, right?

yes.

@fileman
Copy link

fileman commented Aug 22, 2017

EF Core Model-filter (Global Filter) doesn't support nav propreties too ... if you want comment / +1 this issue

@tuvshuu
Copy link

tuvshuu commented Aug 22, 2017

Thank you very much, but one more thing how do we enable Google and Facebook login ? please :)

@viewtance
Copy link

@hikalkan IdentityServer/IdentityServer4.AspNetIdentity#29 already closed

@hikalkan
Copy link
Member Author

@viewtance notice that it's closed because there is such an open issue: DuendeArchive/IdentityServer4#1055

@hikalkan
Copy link
Member Author

@tuvshuu There are already documents (by Microsoft) for social logins.

@hikalkan
Copy link
Member Author

Just released v3.0.0-beta1.
All packages are released except Abp.ZeroCore.IdentityServer4 and Abp.ZeroCore.IdentityServer4.EntityFrameworkCore.

Please share your results if you can test it.

@viewtance
Copy link

@hikalkan Great job, would you considering release a beta AspNet Zero Core version according to ABP 3.0 beta version?

@hikalkan
Copy link
Member Author

@viewtance We can not because we are waiting IdentityServer4 dependency (and we don't want to remove all IdentityServer4 related code from the project and add it later when it's released).

@hikalkan
Copy link
Member Author

I upgraded module-zero-core-template (https://github.com/aspnetboilerplate/module-zero-core-template/tree/netcore2.0-2). It's not released on https://aspnetboilerplate.com/Templates but you can see in this (netcore2.0-2) branch.

@natiki
Copy link
Contributor

natiki commented Aug 23, 2017

Is the ABP 2.x branch going to continue? We are not yet ready to upgrade to VS2017 and .NET Core 2 and the 3.x branch.

@hikalkan I am also guessing that 3.x will be the basis for "version next" of ABP we discussed some time ago? Will that then become 4.x?

@hikalkan
Copy link
Member Author

Is the ABP 2.x branch going to continue? We are not yet ready to upgrade to VS2017 and .NET Core 2 and the 3.x branch.

2.x branch for critical bugfixes for v2.x. We can not continue to develop two versions/branchs. We will continue to develop 3.x after 3.0 release.

I am also guessing that 3.x will be the basis for "version next" of ABP we discussed some time ago? Will that then become 4.x?

@natiki I explained why it's 3.0 here: #2406 (comment)
Don't know, maybe it's 4, 5 or 6.. what's matters :)

@natiki
Copy link
Contributor

natiki commented Aug 24, 2017

We can not continue to develop two versions/branchs. We will continue to develop 3.x after 3.0 release.

Understood.

@natiki I explained why it's 3.0 here: #2406 (comment)

My bad I did not start reading at the top. Sorry :-(

So if I have this right then this will also require an upgrade to VS2017 as well for any .Core projects? It is my understanding that VS2015 will not support .NET Standard 2.0 (Unless you do some fiddling by opening the existing project in VS2017 saving it and then reopening it in VS2015).

Or put another way what is your expected minimum version of VS that you will support once 3.0 is out for .NET 4.61 and .NET Standard 2.0? Is it VS2015 with .NET 4.61 and VS2017 with .NET Standard 2.0?

@hikalkan
Copy link
Member Author

These are Microsoft's breaking changes, not ours.

I suggest to use VS 2017. It's already free, I don't see a reason to not use it.

@natiki
Copy link
Contributor

natiki commented Aug 24, 2017

I understand MS is at issue here. I am just trying to understand what my options are here. For other reasons the team needs Professional so using the free version of VS is not an option. Upgrading them to VS2017 is in the roadmap I am just trying to work out it works with what is coming for ABP.

So am I correct in understanding that I could use VS2015 with .NET 4.61 and ABP 3?

@hikalkan
Copy link
Member Author

could use VS2015 with .NET 4.61 and ABP 3

Haven't tried and don't know actually (VS 2015 is not installed in my computer at all). You may search on the web. What we do is that we move ABP to .netstandard 2.0.

@natiki
Copy link
Contributor

natiki commented Aug 24, 2017

Thanks @hikalkan. I appreciate the hard work you are putting in here. I will do some research and get back to you.

EDIT:

So it looks like it will be possible to use ABP 3.0 with Visual Studio 2015 as long as you use the .NET Framework 4.61 version. Full details here.

If you have are using ,NET Core version (.NET Standard 2 .NET Core 2) then your only option realistically is to use VS2017 as it is doubtful that any seamless support will be added for it to VS2015.

@hikalkan
Copy link
Member Author

We are also excited for new .netstandard2.0 release. But unfortunately there are some problems to solve. One of them is we are getting this exception: https://github.com/dotnet/corefx/issues/23229

You can try module-zero-template branch: https://github.com/aspnetboilerplate/module-zero-template/tree/abp-3.0.0-beta3

@buaziz
Copy link
Contributor

buaziz commented Sep 3, 2017

IdentityServer issue closed
IdentityServer breaking changes list

@viewtance
Copy link

viewtance commented Sep 4, 2017

But it seems one dependence package: https://www.nuget.org/packages/IdentityServer4.AspNetIdentity still has no 2.0.0-preview yet.

@hikalkan
Copy link
Member Author

hikalkan commented Sep 4, 2017

@viewtance Now it has: https://www.nuget.org/packages/IdentityServer4.AspNetIdentity/2.0.0-rc1

We will immediately work on to move to these new packages.

@viewtance
Copy link

@hikalkan Great! A long expected thing.

@hikalkan hikalkan closed this as completed Sep 5, 2017
@tuvshuu
Copy link

tuvshuu commented Sep 16, 2017

When OData to Core 2.0 ?

@hikalkan
Copy link
Member Author

@tuvshuu ask to Microsoft :)

@Ivangrasp
Copy link

Ivangrasp commented Oct 2, 2017

Getting Could not load file or assembly netfx.force.conflicts exception for .net 4.6.1 & asp.net mvc 5.x projects. See dotnet/corefx#23229 - The problem exists only if you have a very long path for the solution.

I downloaded the MVC 5.x startup template and decompressed it in C:\Template (Only the contents in "src" folder).

After setting up the database and building the project (with a lot of "reference not found" warnings, conflicts between dependent assemblies, and a bunch of "Consider app.config remapping of assembly" messages in the Web project) I get the same Could not load file or assembly 'netfx.force.conflicts' error. Path length may not be the only cause of this issue

I'm using Visual Studio 2017 Community Edition, 15.3.5 version.

Edit
After some reading on the dotnet/sdk repo I found a PR that described the issue in a bit more detail, providing a workaround. Half of the lines of the workaround are already in the Web.csproj file. The "complete" workaround looks like this:

<Target Name="ReplaceNetFxNetStandardRefWithLib" AfterTargets="ImplicitlyExpandNETStandardFacades">
  <ItemGroup>
    <Reference Remove="@(_NETStandardLibraryNETFrameworkReference)" Condition="'%(FileName)' != 'netfx.force.conflicts'"/>
    <Reference Include="@(_NETStandardLibraryNETFrameworkLib)">
      <Private>true</Private>
    </Reference>
  </ItemGroup>
</Target>
<Target Name="RemoveNetFxForceConflicts" AfterTargets="ResolveAssemblyReferences">
  <ItemGroup>
    <ReferencePath Remove="@(ReferencePath)" Condition="'%(FileName)' == 'netfx.force.conflicts'" />
  </ItemGroup>
</Target>

I added that only to the Web.csproj file and got the template working. The only thing I don't know how to solve is the warnings and the conflicting dependent assemblies versions.

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

10 participants