dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
259 stars 126 forks source link

Failed to find the matched templates or subcommands #4388

Closed Winniexu01 closed 1 month ago

Winniexu01 commented 1 month ago

main build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2447398&view=logs&j=27bc86d6-5b04-5e7e-1952-551ad1371b06&t=bd4c9d43-a1f6-5ac6-a41a-e6662100a061

All tests of CentOSStream9_Offline_MsftSdk_x64 and Fedora39_Offline_MsftSdk_x64 are failing du to No templates or subcommands found matching: 'globaljson':

To list installed templates similar to 'globaljson', run:
   dotnet new list globaljson
To search for the templates on NuGet.org, run:
   dotnet new search globaljson

For details on the exit code, refer to https://aka.ms/templating-exit-codes#103
   at Microsoft.DotNet.ScenarioTests.Common.ExecuteHelper.ValidateExitCode(ValueTuple`3 result, Int32 expectedExitCode) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.Common/ExecuteHelper.cs:line 106
   at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.DotNetSdkHelper.ExecuteCmdImpl(String args, String workingDirectory, Action`1 additionalProcessConfigCallback, Int32 expectedExitCode, Int32 millisecondTimeout) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/DotNetSdkHelper.cs:line 42
   at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.DotNetSdkHelper.ExecuteCmd(String args, String workingDirectory, Action`1 additionalProcessConfigCallback, Int32 expectedExitCode, Int32 millisecondTimeout) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/DotNetSdkHelper.cs:line 34
   at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.DotNetSdkHelper.ExecuteNew(String projectType, String projectName, String projectDirectory, String language, String customArgs) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/DotNetSdkHelper.cs:line 103
   at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTest.Execute(DotNetSdkHelper dotNetHelper, String testRoot, String[] frameworks, String PreMadeSolution) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTest.cs:line 36
   at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTests.VerifyConsoleTemplateComplex(DotNetLanguage language) in /_/src/scenario-tests/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs:line 32

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
[FAIL] Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTests.VerifyConsoleTemplateComplex(language: FSharp)
System.InvalidOperationException : Failed to execute /vmr/artifacts/obj/extracted-dotnet-sdk/dotnet new globaljson --sdk-version 9.0.100-preview.5.24257.1
Exit code: 103

No templates or subcommands found matching: 'globaljson'.

11 tests of Fedora39_Offline_MsftSdk_x64 are failing du to No templates or subcommands found matching: 'classlib' and 'console':

To list installed templates similar to '***', run:
   dotnet new list ***
To search for the templates on NuGet.org, run:
   dotnet new search ***

No templates or subcommands found matching: '***'.
Did you mean one of the following templates?
   dotnet new class
dotnet-issue-labeler[bot] commented 1 month ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ViktorHofer commented 1 month ago

That got fixed with https://github.com/dotnet/sdk/commit/76143a304ca7e7cbe75a27dd1f3cceb9dd9eeb53