Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VersionGreaterThanOrEquals error on dotnet build #41756

Open
phil-warner opened this issue Jun 24, 2024 · 0 comments
Open

VersionGreaterThanOrEquals error on dotnet build #41756

phil-warner opened this issue Jun 24, 2024 · 0 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@phil-warner
Copy link

Describe the bug

When running dotnet build I get the following error:

/usr/local/share/dotnet/sdk/8.0.302/Microsoft.NETFramework.CurrentVersion.props(117,25): error MSB4184: The expression "[MSBuild]::VersionGreaterThanOrEquals(net7.0, 4.0)" cannot be evaluated.

To Reproduce

  • Running dotnet-sdk on MacOS Ventura.
  • SDK version is 8.0.302.
  • Solution generated using openapi generator.
  • OpenAPI version 3.0.1

csproj file (truncated for brevity) as follows:

<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{C6A8B93A-3AC3-4E5E-8584-B0B4D328ED47}</ProjectGuid>
    <PackageId>TheSMSWorks.API</PackageId>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Org.OpenAPITools</RootNamespace>
    <AssemblyName>Org.OpenAPITools</AssemblyName>
    <TargetFramework>net7.0</TargetFramework>
    <FileAlignment>512</FileAlignment>
    <Authors>The SMS Works Ltd</Authors>
    <Company>The SMS Works Ltd</Company>
    <Description>C# .net 6 library for the SMS Works API</Description>
    <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Org.OpenAPITools.xml</DocumentationFile>
    <RepositoryUrl>https://github.com/TheSMSWorks/smsw-csharp-netcore6.git</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <PackageReleaseNotes>Minor update</PackageReleaseNotes>
    <LangVersion>8.0</LangVersion>
    <Nullable>enable</Nullable>
    <Version>1.11.0</Version>
  </PropertyGroup>
 ... etc

Further technical details

The output of dotnet --info is as follows:

.NET SDK:
 Version:           8.0.302
 Commit:            ef14e02af8
 Workload version:  8.0.300-manifests.00e64df5
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.6
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.302/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.6
  Architecture: x64
  Commit:       3b8b000a0e

.NET SDKs installed:
  2.2.106 [/usr/local/share/dotnet/sdk]
  3.1.402 [/usr/local/share/dotnet/sdk]
  3.1.426 [/usr/local/share/dotnet/sdk]
  6.0.414 [/usr/local/share/dotnet/sdk]
  7.0.308 [/usr/local/share/dotnet/sdk]
  8.0.302 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant