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
Installing .net 6 is required for 5.0 projects and when installing this version the build agent on the same machine fails to build due to error #3532
Comments
This issue is now impacting my dotnet 5 publish where I have used by .NET 5 and 3 SDK. The version 3 SDK is required unfortunately for .NET 5 based Azure V3 functions... |
Hello, @FahaoTang could you please provide error logs or repro steps for your issue? |
The steps to reproduce:
I eventually resolved the issue by separate Azure Functions build into another pipeline and my website build pipeline only build the website project. It's working but the pipeline time has increased from 6-7 mins to almost 20 mins ( due to npm install command now runs longer). |
Hello @FahaoTang,
|
Thanks for the suggestions. |
@FahaoTang, please notify us about the results, and let us know if you need additional help. |
Hello, I am using Azure DevOps to build and the agent I used is windows-2022 with NuGet 5.11.0.10 already. Note: my previous error was not caused by different dependent SDKs; it was because Node.js issue (times out I guess) when building in that agent. After I commented out the node.js actions in Publish step, my build has always been successful. Apologies my original comment may have caused confusion. |
@FahaoTang, thank you for this info. |
I didn't raise the original issue thus would not be able to confirm that. I can confirm my previous issue was resolved by removing Node.js build task from publish task in my Azure DevOps build pipeline. The error message is the same but I don't think it was caused by Nuget version related issue. |
This issue is not related to agent itself, most likely this is environment-specific. And there is no new repro. |
I am also getting the same error and I followed the above-suggested step but error is still prevailing For switch syntax, type "MSBuild -help" |
This was copied from https://developercommunity.visualstudio.com/t/Installing-net-6-is-required-for-50-pr/1474894
When I have the latest version of the preview 2022 I cannot use the build agent on my machine for devops. I recieve the error below in the pipeline. If I on the other hand uninstall .net 6.0 the pipeline runs smoothly. The installer tells me I still have 5.0 installed but the project with .net 5.0 version cannot be opened and visual studio suggests that I should install some packages. After installation I end up in the same situation where the build agent pipeline fails meanwhile the project can be opened again.
"
##[error]Error: The process ‘C:\Program Files\dotnet\dotnet.exe’ failed with exit code 1
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : …
The text was updated successfully, but these errors were encountered: