OpenAPI issue

Jonathan 20 Reputation points
2026-02-03T14:23:41.73+00:00

Hi,

Can you help it below? How to fix it? Originally I was with this error "The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)"

User's image

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 82,596 Reputation points Volunteer Moderator
    2026-02-03T22:37:52.1133333+00:00

    show your project file. should look like:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
      <PropertyGroup>
        <TargetFramework>net10.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
      </PropertyGroup>
    
      <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.2" />
      </ItemGroup>
    
    </Project>
    
    

    also try (after checking project file):

    % dotnet restore
    % dotnet build
    
    0 comments No comments

  2. Jonathan 20 Reputation points
    2026-02-04T01:17:01.41+00:00

    Here is the project details

    User's image

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.