dotnet new -i not reporting errors and exclusions not working as expected
See original GitHub issueDoing some work on this PR at the moment. https://github.com/eShopWorld/template-webapi-fabric/pull/23
On my final test to install the template it just bombs out with no errors:
nuget pack C:\[path]\template-webapi-fabric\src\Eshopworld.WebAPIFabric.Template.nuspec
create new dir, navigate to it and run
dotnet new -i C:\[path]\template-webapi-fabric\src\Eshopworld.WebAPIFabric.Template.1.0.8.nupkg
The previous version does work as expected ie: 1.0.7. This is what is also in the master branch and creating this template on my machine runs just fine.
After you check what has been installed with 1.0.8 you are left with just the standard set of templates as outlined here:
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
NUnit 3 Test Project nunit [C#], F#, VB Test/NUnit
NUnit 3 Test Item nunit-test [C#], F#, VB Test/NUnit
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 Empty web [C#], F# Web/Empty
ASP.NET Core Web App (Model-View-Controller) mvc [C#], F# Web/MVC
ASP.NET Core Web App webapp [C#] Web/MVC/Razor Pages
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
Razor Class Library razorclasslib [C#] Web/Razor/Library/Razor Class Library
ASP.NET Core Web API webapi [C#], F# Web/WebAPI
global.json file globaljson Config
NuGet Config nugetconfig Config
Web Config webconfig Config
Solution File sln Solution
Examples:
dotnet new mvc --auth Individual
dotnet new xunit
dotnet new --help
Additionally, the exclusions within the https://github.com/eShopWorld/template-webapi-fabric/blob/bc04a29e681554861ccf35d287fc1c1702bbe883/src/.template.config/template.json do not seem to work as expected. I’ve tried a few varieties of options here and played them within the modifiers array as suggested here https://github.com/dotnet/templating/issues/850 but to no avail.
Any help on both issues would be appreciated.
Thanks Dave
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:19 (6 by maintainers)
Top GitHub Comments
Above was implemented and merged to main branch, only list of installed templates is shown to users now, closing.
The issue will be fixed with https://github.com/dotnet/templating/issues/2745, when implementing that epic install-uninstall was majorly reworked.
The error messages and the result of installation will be now shown to user. If installation was not successful, the error and the reason will be shown to user.
Draft example:
If installation was successful, the list of installed templates will be shown to user: