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

[BUG] Build failed with MSBuild 16.8.0 #1037

Closed
vbornand opened this issue Jan 25, 2021 · 5 comments
Closed

[BUG] Build failed with MSBuild 16.8.0 #1037

vbornand opened this issue Jan 25, 2021 · 5 comments
Labels

Comments

@vbornand
Copy link
Contributor

vbornand commented Jan 25, 2021

Describe the bug
With the version 6.0.0-preview.94 the build failed with MSBuild 16.8.0 with the error message:
Projects using Refit cannot build using MSBuild '16.8.0'. MSBuild '16.8.0' or later is required

Steps To Reproduce

  1. Compile a project using Refit on a computer with MSBuild 16.8.0 (For example the Azure DevOps agents have currently the version 16.8.0+126527ff1)
  2. Get the error message: Projects using Refit cannot build using MSBuild '16.8.0'. MSBuild '16.8.0' or later is required

Expected behavior

  1. No error message

Additional context
The MSBuild version check has been added in the following commit:
b14eca7

I think the condition should be < instead of <=:
Condition=" '$([System.Version]::Parse($(_RefitMSBuildMinVersion)).CompareTo($([System.Version]::Parse($(MSBuildVersion)))))' &gt;= '0' "

@clairernovotny
Copy link
Member

Thanks, just released it to NuGet as v6.0-preview.96

@srburton
Copy link

@clairernovotny

Refit: 6.0.38

docker build -t my_projet .

 > [build 17/17] RUN dotnet build "App.WebApi.csproj" -c Release -o /app/build:
#25 0.801 Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
#25 0.801 Copyright (C) Microsoft Corporation. All rights reserved.
#25 0.801
#25 1.384   Determining projects to restore...
#25 4.202   All projects are up-to-date for restore.
#25 7.933   App.Domain -> /app/build/App.Domain.dll
#25 7.936 Ioc.cs(81,30): warning CS0168: The variable 'ex' is declared but never used [/src/src/Infra/Bootstrap/App.Infra.Bootstrap/App.Infra.Bootstrap.csproj]
#25 8.072   App.Infra.Bootstrap -> /app/build/App.Infra.Bootstrap.dll
#25 8.200 /root/.nuget/packages/refit/6.0.38/buildTransitive/netstandard2.0/refit.targets(19,5): error : Projects using Refit cannot build using MSBuild '16.7.0'. MSBuild '16.8.0' or later is required. [/src/src/Infra/Integration/App.Infra.Integration.DanMe/App.Infra.Integration.DanMe.csproj]
#25 8.225 /root/.nuget/packages/refit/6.0.38/buildTransitive/netstandard2.0/refit.targets(19,5): error : Projects using Refit cannot build using MSBuild '16.7.0'. MSBuild '16.8.0' or later is required. [/src/src/Infra/Integration/App.Infra.Integration.BigDataCloud/App.Infra.Integration.BigDataCloud.csproj]
#25 9.136   App.Infra.Integration.Jwt -> /app/build/App.Infra.Integration.Jwt.dll
#25 9.228   App.Infra.Integration.Database -> /app/build/App.Infra.Integration.Database.dll
#25 9.233   App.Infra.Integration.Hangfire -> /app/build/App.Infra.Integration.Hangfire.dll
#25 9.775   App.Repositories -> /app/build/App.Repositories.dll
#25 10.52   App.Application -> /app/build/App.Application.dll
#25 10.59
#25 10.59 Build FAILED.
#25 10.59
#25 10.60 Ioc.cs(81,30): warning CS0168: The variable 'ex' is declared but never used [/src/src/Infra/Bootstrap/App.Infra.Bootstrap/App.Infra.Bootstrap.csproj]
#25 10.60 /root/.nuget/packages/refit/6.0.38/buildTransitive/netstandard2.0/refit.targets(19,5): error : Projects using Refit cannot build using MSBuild '16.7.0'. MSBuild '16.8.0' or later is required. [/src/src/Infra/Integration/App.Infra.Integration.DanMe/App.Infra.Integration.DanMe.csproj]
#25 10.60 /root/.nuget/packages/refit/6.0.38/buildTransitive/netstandard2.0/refit.targets(19,5): error : Projects using Refit cannot build using MSBuild '16.7.0'. MSBuild '16.8.0' or later is required. [/src/src/Infra/Integration/App.Infra.Integration.BigDataCloud/App.Infra.Integration.BigDataCloud.csproj]
#25 10.60     1 Warning(s)
#25 10.60     2 Error(s)
#25 10.60
#25 10.60 Time Elapsed 00:00:09.71
------
executor failed running [/bin/sh -c dotnet build "App.WebApi.csproj" -c Release -o /app/build]: exit code: 1

@vbornand
Copy link
Contributor Author

@srburton you have MSBuild 16.7.0. You have to use the version 16.8.0 or +.

@MuraliGitHub1204
Copy link

@srburton you have MSBuild 16.7.0. You have to use the version 16.8.0 or +.

@vbornand how to change that ? can you pls let us know.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants