简体   繁体   中英

Convert OwinADAuthentication from .NET Framework to .NET Core

How can I convert this project into .NET Core?

I tried (according to this site) to change the file ActiveDirectoryAuthentication.csproj as follows:

<PropertyGroup>
  <TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

but when I open the file in Visual Studio 2019 it looks like this: 在此输入图像描述

It's probably easier to start fresh. You are following a tutorial that is talking about an existing database/project.

Instead start here : https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db?tabs=visual-studio which is the same tutorial but actually starts fresh.

At a guess, If you are using Visual Studio, you need to install the .NET Core workloads and/or install the .NET Core 2.2 SDK https://dotnet.microsoft.com/download/dotnet-core/2.2

As well as updating the target framework you're using, you also need to make sure that all of your dependencies work with .NET core too, and in cases where they don't you'll need to find alternative packages that do.

https://docs.microsoft.com/en-us/dotnet/core/porting/ offers a wonderful guide on porting to .NET core , and also offers a number of CLI tools for checking how easy it will be to port your code.

Hope that helps,

Alex

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM