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

kiota 1.13.0 build failure #4449

Closed
chenrui333 opened this issue Apr 5, 2024 · 9 comments
Closed

kiota 1.13.0 build failure #4449

chenrui333 opened this issue Apr 5, 2024 · 9 comments

Comments

@chenrui333
Copy link
Contributor

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log
MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
  Restored /private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Builder/Kiota.Builder.csproj (in 2.08 sec).
  Restored /private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/kiota/kiota.csproj (in 3.52 sec).
  Restored /private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Generated/KiotaGenerated.csproj (in 6.98 sec).
  KiotaGenerated -> /private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Generated/bin/Release/netstandard2.0/KiotaGenerated.dll
/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/.brew_home/.nuget/packages/microsoft.build.tasks.git/8.0.0/build/Microsoft.Build.Tasks.Git.targets(25,5): warning : Unable to locate repository with working directory that contains directory '/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Builder'. [/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Builder/Kiota.Builder.csproj]
/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/.brew_home/.nuget/packages/microsoft.sourcelink.common/8.0.0/build/Microsoft.SourceLink.Common.targets(53,5): warning : Source control information is not available - the generated source link is empty. [/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Builder/Kiota.Builder.csproj]
CSC : error CS9057: The analyzer assembly '/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Generated/bin/Release/netstandard2.0/KiotaGenerated.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'. [/private/tmp/kiota-20240404-49402-1ml7av/kiota-1.13.0/src/Kiota.Builder/Kiota.Builder.csproj]

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8554825930/job/23441064334
relates to Homebrew/homebrew-core#167996

@github-project-automation github-project-automation bot moved this to Todo 📃 in Kiota Apr 5, 2024
@andrueastman
Copy link
Member

Thanks for raising this @chenrui333

Any chance you can confirm the version of the .NET Sdk you are using? You may need to update it given the error sugested by the log.

@chenrui333
Copy link
Contributor Author

Any chance you can confirm the version of the .NET Sdk you are using? You may need to update it given the error sugested by the log.

@andrueastman we are using 8.0.3, and I tried to update global.json to accommodate it, which got the same error

@chenrui333
Copy link
Contributor Author

is there any documentations for such error patch (which I can update my update and see how it goes)

@andrueastman
Copy link
Member

Are you able to share the output of running

dotnet --version

According to this, the latest version should return 8.0.203

@chenrui333
Copy link
Contributor Author

this is what I see

$ dotnet --version
8.0.103

@andrueastman
Copy link
Member

Any chance you can try updating to the latest version?
I believe this dependecy is what is causing the error on your side and it would require you to be on the latest version of the compiler.
#4285

@chenrui333
Copy link
Contributor Author

yeah, needs dotnet 8.0.4 I believe

(but I have to say kiota 1.13.0 does not build with dotnet 8.0.3, which uses dotnet-sdk 8.0.103, is there any way that we can lock the version?) Thanks!

@baywet
Copy link
Member

baywet commented Apr 12, 2024

Hi @chenrui333
Thanks for the additional information.
This is a recurring problem, and yes, locking the framework version in steps with the dependency should help avoiding those situations.
This is possible thanks to the global JSON
https://learn.microsoft.com/en-us/dotnet/core/tools/global-json

Would you be willing to submit a pull request to address this?

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants