microsoft / microsoft/kiota

`Kiota generate` fails: You must install or update .NET to run this application

Open
#8,002 0 comments 0 reactions 0 assignees View on GitHub
status:waiting-for-triage type:bug
Dominant language
C#
Stars
3.8k
Forks
333
Avg merge
16h 29m
Merged PRs (30d)
116

Description

### What are you generating using Kiota, clients or plugins?

Kiota plugin

### In what context or format are you using Kiota?

Nuget tool

### Client library/SDK language

None

### Describe the bug

We have Kiota installed inside the container with .NET 10, but the `kiota generate` command fails with

```
You must install or update .NET to run this application.
App: /github/home/.dotnet/tools/kiota
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /usr/share/dotnet
The following frameworks were found:
10.0.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=linux-x64&os=ubuntu.24.04
```

Why? I thought that the latest Kiota will work with .NET 10 and doesn't require .NET 8 to be installed

### Expected behavior

Can run the `kiota generate` command

### How to reproduce

Create Docker container from dotnet/sdk:10.0 image.
Install and run Kiota

### Open API description file

_No response_

### Kiota Version

1.34.1

### Latest Kiota version known to work for scenario above?(Not required)

_No response_

### Known Workarounds

_No response_

### Configuration

OS: Ubuntu 24.04
Docker container with the image `dotnet/sdk:10.0`

DOTNET_RUNNING_IN_CONTAINER=true
DOTNET_VERSION=10.0.10
ASPNET_VERSION=10.0.10
DOTNET_NOLOGO=true
DOTNET_SDK_VERSION=10.0.302
DOTNET_USE_POLLING_FILE_WATCHER=true
NUGET_XMLDOC_MODE=skip
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-24.04

### Debug output

Click to expand log
```

```

### Other information

`dotnet tool list --global` returns

```
Package Id Version Commands
--------------------------------------------------
microsoft.openapi.kiota 1.34.1 kiota
```

`dotnet tool install --global Microsoft.OpenApi.Kiota --configfile nuget.config` returns

```
Tool 'microsoft.openapi.kiota' is already installed.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by installing Kiota 1.34.1 as a global tool in a dotnet/sdk:10.0 container on Ubuntu 24.04, then run `kiota generate`. Compare the tool's required Microsoft.NETCore.App 8.0.0 with the available .NET 10 runtime. Done means the NuGet-installed Kiota command runs successfully in this environment without requiring a separate .NET 8 installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.