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

NuGet.Client build.sh is broken #10139

Closed
tmds opened this issue Oct 19, 2020 · 8 comments · Fixed by NuGet/NuGet.Client#3623
Closed

NuGet.Client build.sh is broken #10139

tmds opened this issue Oct 19, 2020 · 8 comments · Fixed by NuGet/NuGet.Client#3623
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Community PRs (and linked Issues) created by someone not in the NuGet team help wanted Considered good issues for community contributions. Type:Bug Type:DeveloperDocs Type:Engineering product/infrastructure work/not a customer bug/feature/DCR

Comments

@tmds
Copy link

tmds commented Oct 19, 2020

./build.sh fails when trying to install .NET Core 1.1:

$ ./build.sh 
Installing dotnet CLI
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 34939  100 34939    0     0  85425      0 --:--:-- --:--:-- --:--:--  541k
dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/1.1.11/dotnet-sdk-1.1.11-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404 
dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Sdk/1.1.11/dotnet-sdk-1.1.11-linux-x64.tar.gz
dotnet_install: Error: Could not find/download: `.NET Core SDK` with version = 1.1.11
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
@donnie-msft donnie-msft added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Oct 22, 2020
@donnie-msft
Copy link
Contributor

@tmds do you have zlib installed on your machine as mentioned in the error?

@donnie-msft donnie-msft added the Type:Engineering product/infrastructure work/not a customer bug/feature/DCR label Oct 22, 2020
@tmds
Copy link
Author

tmds commented Oct 22, 2020

@tmds do you have zlib installed on your machine as mentioned in the error?

It's a warning that may be ignored, see dotnet/install-scripts#6.

This is the error:

otnet_install: Error: Could not find/download: `.NET Core SDK` with version = 1.1.11
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

@donnie-msft donnie-msft removed the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Oct 22, 2020
@donnie-msft
Copy link
Contributor

It looks like this script has been a bit neglected. That version of dotnet core is no longer supported.
In the meantime,

  • Our CI pipeline runs scripts/funcTests/runFuncTests.sh - give that a shot
  • If you're trying to run dotnet tests, you can dotnet build and run tests adhoc on Linux

@tmds
Copy link
Author

tmds commented Oct 23, 2020

Thanks for the pointers.

A maintained build.sh script is a welcome message for external contributors.

@aortiz-msft aortiz-msft added Category:Quality Week Issues that should be considered for quality week help wanted Considered good issues for community contributions. labels Oct 23, 2020
@neeraj9
Copy link

neeraj9 commented Jan 4, 2021

I am facing same issue while trying to build nuget client. A couple of questions before giving up on the build.sh.

  1. What is the correct value for the channel (via "-c" param) within build.sh?
  2. Do I need to give version (via "-v" param) within build.sh to fetch correct dotnet CLI?

I tried [2] and it did proceed further but only to fail later.
Private Changes:

neeraj@lp:~/other/NuGet.Client$ git diff build.sh
diff --git a/build.sh b/build.sh
index 565ef77c4..b36b82455 100755
--- a/build.sh
+++ b/build.sh
@@ -19,7 +19,7 @@ curl -o cli/dotnet-install.sh -L https://dot.net/v1/dotnet-install.sh
 chmod +x cli/dotnet-install.sh

 # v1 needed for some test and bootstrapping testing version
-cli/dotnet-install.sh -i cli -c 1.0
+cli/dotnet-install.sh -i cli -c 1.0 -v 5.0.101

 DOTNET="$(pwd)/cli/dotnet"

Failure logs:

neeraj@lp:~/other/NuGet.Client$ ./build.sh
Installing dotnet CLI
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 35418  100 35418    0     0  38708      0 --:--:-- --:--:-- --:--:-- 38708
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.101/dotnet-sdk-5.0.101-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.101/dotnet-sdk-5.0.101-linux-x64.tar.gz
dotnet-install: Adding to current process PATH: `/home/neeraj/other/NuGet.Client/cli`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
/home/neeraj/other/NuGet.Client/cli/dotnet msbuild build/config.props /v:m /nologo /t:GetCliBranchForTesting
  master 5.0.100-preview.7.20319.6
master 5.0.100-preview.7.20319.6
dotnet_install: Error: Unknown argument `5.0.100-preview.7.20319.6`
5.0.101
=================

...

EXEC : The path '/home/neeraj/other/NuGet.Client/packages/xunitxml.testlogger/2.0.0/build/_common' specified in the 'TestAdapterPath' is invalid. warning : The custom test adapter search path provided was not found, provide a valid path and try again. [/home/neeraj/other/NuGet.Client/build/build.proj]
/home/neeraj/other/NuGet.Client/build/build.proj(406,5): warning MSB3073: The command "/home/neeraj/other/NuGet.Client/cli/dotnet vstest /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/Microsoft.Build.NuGetSdkResolver.Tests/bin/Release/netcoreapp2.1/Microsoft.Build.NuGetSdkResolver.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/Microsoft.Build.NuGetSdkResolver.Tests/bin/Release/netcoreapp5.0/Microsoft.Build.NuGetSdkResolver.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Console.Test/bin/Release/netcoreapp2.1/NuGet.Build.Tasks.Console.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Console.Test/bin/Release/netcoreapp5.0/NuGet.Build.Tasks.Console.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Pack.Test/bin/Release/netcoreapp2.1/NuGet.Build.Tasks.Pack.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Pack.Test/bin/Release/netcoreapp5.0/NuGet.Build.Tasks.Pack.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Test/bin/Release/netcoreapp2.1/NuGet.Build.Tasks.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Build.Tasks.Test/bin/Release/netcoreapp5.0/NuGet.Build.Tasks.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/bin/Release/netcoreapp2.1/NuGet.CommandLine.Xplat.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.CommandLine.Xplat.Tests/bin/Release/netcoreapp5.0/NuGet.CommandLine.Xplat.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Commands.Test/bin/Release/netcoreapp2.1/NuGet.Commands.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Commands.Test/bin/Release/netcoreapp5.0/NuGet.Commands.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Common.Test/bin/Release/netcoreapp2.1/NuGet.Common.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Common.Test/bin/Release/netcoreapp5.0/NuGet.Common.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Configuration.Test/bin/Release/netcoreapp2.1/NuGet.Configuration.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Configuration.Test/bin/Release/netcoreapp5.0/NuGet.Configuration.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.DependencyResolver.Core.Tests/bin/Release/netcoreapp2.1/NuGet.DependencyResolver.Core.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.DependencyResolver.Core.Tests/bin/Release/netcoreapp5.0/NuGet.DependencyResolver.Core.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Frameworks.Test/bin/Release/netcoreapp2.1/NuGet.Frameworks.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.LibraryModel.Tests/bin/Release/netcoreapp2.1/NuGet.LibraryModel.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Packaging.Test/bin/Release/netcoreapp2.1/NuGet.Packaging.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Packaging.Test/bin/Release/netcoreapp5.0/NuGet.Packaging.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.ProjectModel.Test/bin/Release/netcoreapp2.1/NuGet.ProjectModel.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.ProjectModel.Test/bin/Release/netcoreapp5.0/NuGet.ProjectModel.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Protocol.Tests/bin/Release/netcoreapp2.1/NuGet.Protocol.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Protocol.Tests/bin/Release/netcoreapp5.0/NuGet.Protocol.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Resolver.Test/bin/Release/netcoreapp2.1/NuGet.Resolver.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Resolver.Test/bin/Release/netcoreapp5.0/NuGet.Resolver.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Shared.Tests/bin/Release/netcoreapp2.1/NuGet.Shared.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Shared.Tests/bin/Release/netcoreapp5.0/NuGet.Shared.Tests.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Versioning.Test/bin/Release/netcoreapp2.1/NuGet.Versioning.Test.dll /home/neeraj/other/NuGet.Client/test/NuGet.Core.Tests/NuGet.Versioning.Test/bin/Release/netcoreapp5.0/NuGet.Versioning.Test.dll --TestAdapterPath:/home/neeraj/other/NuGet.Client/packages/xunitxml.testlogger/2.0.0/build/_common --logger:"xunit;LogFileName=CoreUnitTests-vsts.xml" --logger:"console;verbosity=detailed" --settings:/home/neeraj/other/NuGet.Client/build/xunit.runsettings" exited with code 1.
/home/neeraj/other/NuGet.Client/build/build.proj(406,5): warning MSB4181: The "Exec" task returned false but did not log an error.
/home/neeraj/other/NuGet.Client/build/build.proj(413,5): error : NETCore CoreUnitTests tests failed! Results: /home/neeraj/other/NuGet.Client/build/TestResults/CoreUnitTests-vsts.xml
Tests failed!!

@neeraj9
Copy link

neeraj9 commented Jan 4, 2021

Ah! My bad. I did not go through build.sh enough. I believe there was a requirement to fetch older dotnet version towards bootstrapping. So, my comment earlier is incorrect but the issue still stands.

@omajid
Copy link

omajid commented Jan 22, 2021

A maintained build.sh script is a welcome message for external contributors.

I would argue that, worse, it prevents contributions, especially the drive-by kind. I have some fixes for NuGet.Client but I have no idea how to build/test it given that the obvious choice ./build.sh is just out of date.

@omajid
Copy link

omajid commented Jan 22, 2021

Our CI pipeline runs scripts/funcTests/runFuncTests.sh - give that a shot

I get:

/devel/NuGet.Client ~/devel/NuGet.Client
scripts/funcTests/runFuncTests.sh: line 26: mono: command not found
Installing dotnet CLI
dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/2.2.402/dotnet-sdk-2.2.402-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/2.2.402/dotnet-sdk-2.2.402-linux-x64.tar.gz
dotnet-install: Binaries of dotnet can be found in /home/omajid/devel/NuGet.Client/cli
dotnet-install: Installation finished successfully.
dotnet msbuild build/config.props /v:m /nologo /t:GetCliBranchForTesting
scripts/funcTests/runFuncTests.sh: line 46: dotnet: command not found
scripts/funcTests/runFuncTests.sh: line 47: dotnet: command not found

Channel is: 
Version is: 
curl: (22) The requested URL returned error: 404 The specified blob does not exist.
A compatible SDK version for global.json version: [5.0.100-preview] from [/home/omajid/devel/NuGet.Client/global.json] was not found
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
scripts/funcTests/runFuncTests.sh: line 65: dotnet: command not found
initial dotnet cli install finished at 2021-01-22T17:36:58
=================
Deleting .NET Core temporary files
second dotnet cli install finished at 2021-01-22T17:36:58
=================
scripts/funcTests/runFuncTests.sh: line 79: dotnet: command not found
Restore failed!!
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Community PRs (and linked Issues) created by someone not in the NuGet team help wanted Considered good issues for community contributions. Type:Bug Type:DeveloperDocs Type:Engineering product/infrastructure work/not a customer bug/feature/DCR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants