Skip to content

odata-cli uses an unsupported .net SDK #429

@DevAlsicJanDeclercq

Description

@DevAlsicJanDeclercq

Describe the bug

Odata-cli has a requirement on .NET sdk 6.0.
This version of the framework is no longer supported.
Does that mean that this tool is also deprecated?

Version of the Project affected

OData.cli 0.3.1

To Reproduce

1 Only supported frameworks installed:
dotnet --list-sdks
8.0.408 [C:\Program Files\dotnet\sdk]
9.0.203 [C:\Program Files\dotnet\sdk]

2 Install tool
dotnet tool install --global Microsoft.OData.Cli
odata.cli --version

Expected behavior

Working tool

Actual behavior

Unhandled exception. System.InvalidOperationException: No instances of MSBuild could be detected.
Try calling RegisterInstance or RegisterMSBuildPath to manually register one.
   at Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()
   at Microsoft.OData.Cli.Program.Main(String[] args) in D:\a\1\s\src\Microsoft.OData.Cli\Program.cs:line 10
   at Microsoft.OData.Cli.Program.<Main>(String[] args)

Workaround

Install unsupported software in a container

Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:6.0.428-1-alpine3.20 AS sdk

ENV PATH="/root/.dotnet/tools:${PATH}"
RUN dotnet tool install --global Microsoft.OData.Cli

ENTRYPOINT [ "odata-cli" ]

docker build . -t odata-cli
docker run odata-cli --version

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions