Dotnet core framework sdk'sı varsayılan olarak bir çok proje şablonu ile gelir. Bir önceki bölümde bu proje şablonlarını nasıl kullanabileceğimizi görmüştük.
Şimdi ise bu proje şablonları ile ilgili listeleme, arama, yükleme, silme ve güncelleme işlemlerini sırasıyla inceleyeceğiz.
İlk olarak list komutunu --help opsiyonu ile inceleyelim.
dotnet new list --help
Komutu kullandığımızda çıktısı aşağıdaki gibi gelmektedir. Açıklamada da belirtildiği gibi bu komut ile bilgisayarımızda yüklü olan proje veya dosya oluşturma şablonlarını listeleyebiliyoruz.
Listeleme işlemlerini author, type, language gibi opsiyonlar ile filtreleyerek farklı sonuçlar alabiliyoruz.
eg@debian:~$ dotnet new list --help
Description:
Lists templates containing the specified template name. If no name is specified, lists all templates.
Usage:
dotnet new list [<template-name>] [options]
Arguments:
<template-name> If specified, only the templates matching the name will be shown.
Options:
--author <author> Filters the templates based on the template author.
-lang, --language <language> Filters templates based on language.
--type <type> Filters templates based on available types. Predefined values are "project" and "item".
--tag <tag> Filters the templates based on the tag.
--ignore-constraints Disables checking if the template meets the constraints to be run.
-o, --output <output> Location to place the generated output.
--project <project> The project that should be used for context evaluation.
--columns-all Displays all columns in the output.
--columns <author|language|tags|type> Specifies the columns to display in the output.
-v, --verbosity <LEVEL> Sets the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], and diag[nostic]. [default: normal]
-d, --diagnostics Enables diagnostic output.
-?, -h, --help Show command line help.
dotnet new list
Herhangi bir opsiyon kullanmadan komutu kullandığımızda aşağıdaki çıktıda olduğu gibi bize dotnet core framework, sdk'sı ile gelen proje şablonlarını ad, kısa ad, dil ve etiket sütunlarını içerecek şekilde listeledi.
Burada isterseniz şablon adı argümanını girerek sonuçları filtreleyebilirsiniz. Ayrıca kolon ismi opsiyonu girerek sadece istediğiniz kolonların listelenmesini sağlayabilirsiniz.
eg@debian:~$ dotnet new list
These templates matched your input:
Template Name Short Name Language Tags
-------------------------------------------- --------------------- ---------- --------------------------------
ASP.NET Core Empty web [C#],F# Web/Empty
ASP.NET Core gRPC Service grpc [C#] Web/gRPC
ASP.NET Core Web API webapi [C#],F# Web/WebAPI
ASP.NET Core Web App webapp,razor [C#] Web/MVC/Razor Pages
ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with React.js react [C#] Web/MVC/SPA
Blazor Server App blazorserver [C#] Web/Blazor
Blazor Server App Empty blazorserver-empty [C#] Web/Blazor/Empty
Blazor WebAssembly App blazorwasm [C#] Web/Blazor/WebAssembly/PWA
Blazor WebAssembly App Empty blazorwasm-empty [C#] Web/Blazor/WebAssembly/PWA/Empty
Class Library classlib [C#],F#,VB Common/Library
Console App console [C#],F#,VB Common/Console
dotnet gitignore file gitignore Config
Dotnet local tool manifest file tool-manifest Config
EditorConfig file editorconfig Config
global.json file globaljson Config
MSBuild Directory.Build.props file buildprops MSBuild/props
MSBuild Directory.Build.targets file buildtargets MSBuild/props
MSTest Test Project mstest [C#],F#,VB Test/MSTest
MVC ViewImports viewimports [C#] Web/ASP.NET
MVC ViewStart viewstart [C#] Web/ASP.NET
NuGet Config nugetconfig Config
NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit
NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit
Protocol Buffer File proto Web/gRPC
Razor Class Library razorclasslib [C#] Web/Razor/Library
Razor Component razorcomponent [C#] Web/ASP.NET
Razor Page page [C#] Web/ASP.NET
Solution File sln,solution Solution
SpecFlow Configuration JSON File specflow-json [C#] SpecFlow/Configuration/JSON
SpecFlow Feature File specflow-feature [C#] SpecFlow/Feature
SpecFlow Plus Profile specflow-plus-profile [C#] SpecFlow Plus/Profile
SpecFlow Project Template specflowproject [C#] SpecFlow/Project
Web Config webconfig Config
Worker Service worker [C#],F# Common/Worker/Web
xUnit Test Project xunit [C#],F#,VB Test/xUnit