# What .NET Version Does OfficeCLI Use?

> Discover the .NET version OfficeCLI uses. Learn how to check the target framework in the officecli.csproj file for .NET 10.0.

- Repository: [OfficeAI/OfficeCLI](https://github.com/iofficeai/OfficeCLI)
- Tags: internals
- Published: 2026-07-26

---

**OfficeCLI targets .NET 10.0, as specified in the `<TargetFramework>net10.0</TargetFramework>` element within the `officecli.csproj` file.**

The iOfficeAI/OfficeCLI repository provides command-line utilities for Microsoft Office document manipulation. Understanding what .NET version OfficeCLI uses is essential for developers building extensions or contributing to the codebase. According to the source code, the project is explicitly configured to run on the .NET 10.0 runtime.

## Verifying the Target Framework in Source Code

The definitive configuration resides in the project file. In `src/officecli/officecli.csproj`, the **target framework** is declared within a `PropertyGroup` element.

```xml
<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

```

This setting instructs the .NET SDK to compile the application against the .NET 10.0 API surface. When the runtime hosts the application entry point in [`Program.cs`](https://github.com/iOfficeAI/OfficeCLI/blob/main/Program.cs), it executes within the .NET 10.0 environment.

## Checking the .NET Version Locally

You can verify the runtime requirements using command-line tools before installation or when troubleshooting compatibility issues.

### Inspect the Compiled Binary

If OfficeCLI is installed, check its runtime dependencies:

```bash

# Query the runtime information

dotnet --info | grep "Version"

```

Alternatively, if the CLI implements a version flag:

```bash
officecli --version

```

### Examine the Project File Directly

When working with the source code from the iOfficeAI/OfficeCLI repository:

```bash
cat src/officecli/officecli.csproj | grep "TargetFramework"

```

## Building Compatible Extensions

To develop plugins or standalone tools that interact with OfficeCLI, you must target .NET 10.0 to ensure binary compatibility.

### Creating a New .NET 10.0 Project

Initialize a console application that matches OfficeCLI's target framework:

```bash
dotnet new console -f net10.0 -o MyOfficeTool
cd MyOfficeTool
dotnet run

```

### Referencing OfficeCLI in Your Project

Add OfficeCLI as a dependency in your extension's project file:

```xml
<!-- In your .csproj file -->
<ItemGroup>
  <PackageReference Include="OfficeCli" Version="x.y.z" />
</ItemGroup>

<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

```

## Summary

- OfficeCLI is built for **.NET 10.0**, as defined in `src/officecli/officecli.csproj`.
- The `<TargetFramework>net10.0</TargetFramework>` element establishes the minimum required runtime version.
- The application entry point in [`Program.cs`](https://github.com/iOfficeAI/OfficeCLI/blob/main/Program.cs) executes within the .NET 10.0 environment.
- Third-party extensions must target `net10.0` to maintain compatibility with OfficeCLI's API surface.

## Frequently Asked Questions

### What .NET version does OfficeCLI use?

OfficeCLI requires the .NET 10.0 runtime. The `officecli.csproj` file explicitly sets `<TargetFramework>net10.0</TargetFramework>`, meaning the application will only execute on systems with .NET 10.0 installed.

### Can I run OfficeCLI on .NET 8 or .NET 9?

No. Because OfficeCLI targets .NET 10.0 specifically and utilizes APIs available only in that version, it is not backward compatible with .NET 8 or .NET 9 runtimes. You must install .NET 10.0 to use the CLI.

### Where is the .NET version defined in the OfficeCLI repository?

The .NET version is defined in `src/officecli/officecli.csproj` within the `<TargetFramework>` XML element. This project file serves as the single source of truth for the framework version requirements.

### Can I reference OfficeCLI libraries from a .NET 6 project?

No. Since OfficeCLI targets .NET 10.0, you cannot reference it from a .NET 6 project. You must upgrade your project to target `net10.0` in your `.csproj` file to consume OfficeCLI packages successfully.