Giter Site home page Giter Site logo

powershell-dotnet-cli's Introduction

Powershell Script to get installed .NET Templates

dotnet new --list will show the currently installed .NET templates on the machine. This powershell script will make an indexed list of these so that those names can be accessed programatially.

Index     : 1
Name      : Console Application
ShortName : console
Language  : {[C#],  F#,  VB}
Tags      : {Common, Console}

Index     : 2
Name      : Class library
ShortName : classlib
Language  : {[C#],  F#,  VB}
Tags      : {Common, Library}

Index     : 3
Name      : Unit Test Project
ShortName : mstest
Language  : {[C#],  F#,  VB}
Tags      : {Test, MSTest}

Index     : 4
Name      : xUnit Test Project
ShortName : xunit
Language  : {[C#],  F#,  VB}
Tags      : {Test, xUnit}

Index     : 5
Name      : ASP.NET Core Empty
ShortName : web
Language  : {[C#],  F#}
Tags      : {Web, Empty}

Index     : 6
Name      : ASP.NET Core Web App (Model-View-Controller)
ShortName : mvc
Language  : {[C#],  F#}
Tags      : {Web, MVC}

Index     : 7
Name      : ASP.NET Core Web App
ShortName : razor
Language  : {[C#]}
Tags      : {Web, MVC, Razor Pages}

Index     : 8
Name      : ASP.NET Core with Angular
ShortName : angular
Language  : {[C#]}
Tags      : {Web, MVC, SPA}

Index     : 9
Name      : ASP.NET Core with React.js
ShortName : react
Language  : {[C#]}
Tags      : {Web, MVC, SPA}

Index     : 10
Name      : ASP.NET Core with React.js and Redux
ShortName : reactredux
Language  : {[C#]}
Tags      : {Web, MVC, SPA}

Index     : 11
Name      : ASP.NET Core Web API
ShortName : webapi
Language  : {[C#],  F#}
Tags      : {Web, WebAPI}

Index     : 12
Name      : global.json file
ShortName : globaljson
Language  : {}
Tags      : {Config}

Index     : 13
Name      : NuGet Config
ShortName : nugetconfig
Language  : {}
Tags      : {Config}

Index     : 14
Name      : Web Config
ShortName : webconfig
Language  : {}
Tags      : {Config}

Index     : 15
Name      : Solution File
ShortName : sln
Language  : {}
Tags      : {Solution}

Index     : 16
Name      : Razor Page
ShortName : page
Language  : {}
Tags      : {Web, ASP.NET}

Index     : 17
Name      : MVC ViewImports
ShortName : viewimports
Language  : {}
Tags      : {Web, ASP.NET}

Index     : 18
Name      : MVC ViewStart
ShortName : viewstart
Language  : {}
Tags      : {Web, ASP.NET}

powershell-dotnet-cli's People

Contributors

motowilliams avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

lukehuang

powershell-dotnet-cli's Issues

$templates does not work anymore in .Net 5

Hi,
I tried the Get-InstalledDotnetTemplates function in 5.0.100-preview.1.20155.7
The following does not work anymore because the output table has a different format.

#grab the text following the table header + the console horizontial rule
$templates = $dotnetnewlist | Select-Object -Skip (($dotnetnewlist | Select-String "^Templates" -CaseSensitive).LineNumber + 1)

I personaly succed to retrieve all templates short names in dotnet 5 with this line:
$AllTemplates = (dotnet new -l | Where-Object { $_.Length -gt 30 } | Select-Object -Skip 2 | % { (-split $_.Substring(17, 25))[0] })

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.