question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet new -i not reporting errors and exclusions not working as expected

See original GitHub issue

Doing 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
vlada-shubinacommented, Apr 16, 2021

Above was implemented and merged to main branch, only list of installed templates is shown to users now, closing.

1reaction
vlada-shubinacommented, Feb 16, 2021

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:

> dotnet  new  -i Take.Blip.Client.Templates::0.50.10 --nuget-source https://api.nuget.org/v3/index.json
The following template sources will be installed:
  Take.Blip.Client.Templates, version: 0.50.10

Warning: Take.Blip.Client.Templates::0.50.10 is not found in NuGet feeds https://api.nuget.org/v3/index.json.
'Take.Blip.Client.Templates::0.50.10' could not be installed, the package does not exist.

If installation was successful, the list of installed templates will be shown to user:

dotnet new3 -i Microsoft.Azure.WebJobs.ItemTemplates
The following sources will be installed:
  Microsoft.Azure.WebJobs.ItemTemplates

The template source Microsoft.Azure.WebJobs.ItemTemplates::3.1.1648 was successfully installed.
The following templates were installed:
Template Name                  Short Name  Language  Tags
-----------------------------  ----------  --------  ----------------------------------------------
DurableFunctionsOrchestration  durable     [C#]      Azure Function/Durable Functions Orchestration
SendGrid                       sendgrid    [C#]      Azure Function/Ouput/SendGrid
BlobTrigger                    blob        [C#],F#   Azure Function/Trigger/Blob
CosmosDBTrigger                cosmos      [C#],F#   Azure Function/Trigger/Cosmos DB
EventGridTrigger               eventgrid   [C#]      Azure Function/Trigger/EventGrid
EventHubTrigger                eventhub    [C#],F#   Azure Function/Trigger/EventHub
HttpTrigger                    http        [C#],F#   Azure Function/Trigger/Http
SignalRTrigger                 signalr     [C#]      Azure Function/Trigger/Http/SignalR
IotHubTrigger                  iothub      [C#]      Azure Function/Trigger/IotHub
RabbitMQTrigger                rqueue      [C#]      Azure Function/Trigger/RabbitMQ Queue
ServiceBusQueueTrigger         squeue      [C#]      Azure Function/Trigger/Service Bus/Queue
ServiceBusTopicTrigger         stopic      [C#]      Azure Function/Trigger/Service Bus/Topic
QueueTrigger                   queue       [C#]      Azure Function/Trigger/Storage Queue
TimerTrigger                   timer       [C#],F#   Azure Function/Trigger/Timer

Read more comments on GitHub >

github_iconTop Results From Across the Web

NET SDK error list - .NET CLI
A complete list of NETSDKxxxx errors, with links to more info where more info is available.
Read more >
Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >
dotnet test command - .NET CLI
Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version...
Read more >
Enforce HTTPS in ASP.NET Core
New ASP.NET Core Web Application dialog showing the Configure for HTTPS checkbox unselected. Use the --no-https option. For example .NET CLI
Read more >
Use multiple environments in ASP.NET Core
Learn how to control app behavior across multiple environments in ASP.NET Core apps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found