1

I wanna debug openiddict and study it.But I encounter a lot of difficulties. I appended the openiddict source code by Add->Existing Project. Some errors occur during compilation such as Error CS0103 The name 'StringSyntaxAttribute' does not exist in the current context

Error CS8370 Feature 'nullable reference types' is not available in C# 7.3. Please use language version 8.0 or greater. And there is an exclamation on each Dependecies node

I try copy Directory.Packages.props to the solution folder but it doesn't work

MutipleQA
  • 11
  • 1

1 Answers1

0

A. For your language problem, try to do this in Project > Right Click then select Edit Project File

<PropertyGroup>
   <LangVersion>Latest</LangVersion>
</PropertyGroup>

Look at here about C# language versioning.

B. Add OpenIddict Source Code in your project (Not recommended)

  1. Download OpenIddict source code in here. Then extract sourcecode.zip
  2. Right click Solution of your Project > Add > Existing Project > Select OpenIddict.csproj from openiddict-core-4.4.0\openiddict-core-4.4.0\src\OpenIddict folder

C. Or Install OpenIddict via NuGet (Recommended)

VS2022 > Tools > NuGet Package Manager > Package Manager Console > Wait until Package Manager Console visible at bottom of VS2022 then typo NuGet\Install-Package OpenIddict -Version 4.4.0 > Enter

Look at here example and documentation

When you install from NuGet, you can get the latest updates from the developer, making it easier for you to focus on Your Project.

Ihdina
  • 950
  • 6
  • 21
  • It prompts `The SDK 'Microsoft.Dotnet.Arcade.Sdk' specified could not be found` , when I add OpenIddict.csproj follow your method. – MutipleQA Jun 01 '23 at 06:51
  • @MutipleQA, look at https://stackoverflow.com/questions/65331632/how-to-install-microsoft-dotnet-arcade-sdk-into-the-dotnet-sdk-folder – Ihdina Jun 01 '23 at 07:17