aspnet / Templating

[Archived] ASP.NET Core templates for .NET CLI and Visual Studio. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
205 stars 79 forks source link

Flaky tests: WebApiTemplate_Works_NetCore et al #620

Closed ryanbrandenburg closed 6 years ago

ryanbrandenburg commented 6 years ago

This test fails occasionally with the following error:

System.Exception : Process exited with code -2147352562
StdErr: No templates matched the input template name: webapi.
StdOut: Usage: new [options]
Options:
  -h, --help          Displays help for this command.
  -l, --list          Lists templates containing the specified name. If no name is specified, lists all templates.
  -n, --name          The name for the output being created. If no name is specified, the name of the current directory is used.
  -o, --output        Location to place the generated output.
  -i, --install       Installs a source or a template pack.
  -u, --uninstall     Uninstalls a source or a template pack.
  --nuget-source      Specifies a NuGet source to use during install.
  --type              Filters templates based on available types. Predefined values are "project", "item" or "other".
  --force             Forces content to be generated even if it would change existing files.
  -lang, --language   Filters templates based on language and specifies the language of the template to create.
Templates                                 Short Name       Language          Tags          
-------------------------------------------------------------------------------------------
Console Application                       console          [C#], F#, VB      Common/Console
Class library                             classlib         [C#], F#, VB      Common/Library
Unit Test Project                         mstest           [C#], F#, VB      Test/MSTest   
xUnit Test Project                        xunit            [C#], F#, VB      Test/xUnit    
Razor Page                                page             [C#]              Web/ASP.NET   
MVC ViewImports                           viewimports      [C#]              Web/ASP.NET   
MVC ViewStart                             viewstart        [C#]              Web/ASP.NET   
ASP.NET Core with Angular                 angular          [C#]              Web/MVC/SPA   
ASP.NET Core with React.js                react            [C#]              Web/MVC/SPA   
ASP.NET Core with React.js and Redux      reactredux       [C#]              Web/MVC/SPA   
global.json file                          globaljson                         Config        
NuGet Config                              nugetconfig                        Config        
Web Config                                webconfig                          Config        
Solution File                             sln                                Solution      
TypeScript file                           tsfile                             Web/Script    
LESS Style Sheet                          less                               Web/Style     
SCSS Style Sheet (SASS)                   scss                               Web/Style     
Examples:
    dotnet new console 
    dotnet new webconfig
    dotnet new --help
   at Templates.Test.Helpers.ProcessEx.WaitForExit(Boolean assertSuccess) in /_/test/Templates.Test/Helpers/ProcessEx.cs:line 150
   at Templates.Test.TemplateTestBase.RunDotNetNew(String templateName, String targetFrameworkOverride, String auth, String language, Boolean useLocalDB, Boolean noHttps) in /_/test/Templates.Test/Helpers/TemplateTestBase.cs:line 57
   at Templates.Test.WebApiTemplateTest.WebApiTemplateImpl(String targetFrameworkOverride) in /_/test/Templates.Test/WebApiTemplateTest.cs:line 30
------- Stdout: -------
==> C:\b\w\33bdfc1cae7b2a38\.dotnet\x64\dotnet.exe new webapi --debug:custom-hive "C:\b\w\33bdfc1cae7b2a38\modules\Templating\test\Templates.Test\bin\Release\netcoreapp3.0\.templateengine" [C:\b\w\33bdfc1cae7b2a38\modules\Templating\test\Templates.Test\bin\Release\netcoreapp3.0\TestTemplates\AspNet.Template.a15d00d4e60046b48b6e804565a7924e]
Usage: new [options]
Options:
  -h, --help          Displays help for this command.
  -l, --list          Lists templates containing the specified name. If no name is specified, lists all templates.
  -n, --name          The name for the output being created. If no name is specified, the name of the current directory is used.
  -o, --output        Location to place the generated output.
  -i, --install       Installs a source or a template pack.
  -u, --uninstall     Uninstalls a source or a template pack.
  --nuget-source      Specifies a NuGet source to use during install.
  --type              Filters templates based on available types. Predefined values are "project", "item" or "other".
  --force             Forces content to be generated even if it would change existing files.
  -lang, --language   Filters templates based on language and specifies the language of the template to create.
[ERROR] No templates matched the input template name: webapi.
[ERROR] 
Templates                                 Short Name       Language          Tags          
-------------------------------------------------------------------------------------------
Console Application                       console          [C#], F#, VB      Common/Console
Class library                             classlib         [C#], F#, VB      Common/Library
Unit Test Project                         mstest           [C#], F#, VB      Test/MSTest   
xUnit Test Project                        xunit            [C#], F#, VB      Test/xUnit    
Razor Page                                page             [C#]              Web/ASP.NET   
MVC ViewImports                           viewimports      [C#]              Web/ASP.NET   
MVC ViewStart                             viewstart        [C#]              Web/ASP.NET   
ASP.NET Core with Angular                 angular          [C#]              Web/MVC/SPA   
ASP.NET Core with React.js                react            [C#]              Web/MVC/SPA   
ASP.NET Core with React.js and Redux      reactredux       [C#]              Web/MVC/SPA   
global.json file                          globaljson                         Config        
NuGet Config          
...