Dotnet CLI Komutları
  • Giriş
  • Genel Komutlar
    • dotnet
    • dotnet help
    • dotnet sdk check
  • Yüklü Proje Şablonları ile Proje Oluşturma Komutları
    • dotnet new sln
    • dotnet new classlib
    • dotnet new console
    • dotnet new web
    • dotnet new mvc
    • dotnet new webapi
    • dotnet new react
    • dotnet new angular
    • dotnet new grpc
    • dotnet new nunit
    • dotnet new xunit
    • dotnet new mstest
    • dotnet new gitignore
    • dotnet new globaljson
  • Proje Şablon İşlemleri için Komutlar
    • dotnet new list
    • dotnet new search
    • dotnet new install
    • dotnet new uninstall
    • dotnet new update
  • Proje Genel İşlemler için Komutlar
    • dotnet build
    • dotnet clean
    • dotnet publish
    • dotnet run
  • Çözüm (Solution) İşlemleri için Komutlar
    • dotnet sln add
    • dotnet sln remove
    • dotnet sln list
  • Proje Paket İşlemleri Komutları
    • dotnet add package
    • dotnet remove package
    • dotnet list package
  • Projeler Arası Referans Tanımlama Komutları
    • dotnet add reference
    • dotnet remove reference
    • dotnet list reference
  • Proje Sertifika Komutları
    • dotnet dev-certs https
  • Proje Test Komutları
    • dotnet test
  • Dotnet Araçları Genel Komutları
    • dotnet tool list
    • dotnet tool run
    • dotnet tool search
    • dotnet tool install
    • dotnet tool uninstall
    • dotnet tool update
  • Dotnet Code Generator Komutları
    • dotnet aspnet-codegenerator area
    • dotnet aspnet-codegenerator controller
    • dotnet aspnet-codegenerator view
  • Entity Framework Core Migrasyon Komutları
    • dotnet ef migrations add
    • dotnet ef migrations bundle
    • dotnet ef migrations list
    • dotnet ef migrations remove
    • dotnet ef migrations script
  • Entity Framework Core Veritabanı Komutları
    • dotnet ef database update
    • dotnet ef database drop
  • Entity Framework Core DbContext Komutları
    • dotnet ef dbcontext info
    • dotnet ef dbcontext list
    • dotnet ef dbcontext optimize
    • dotnet ef dbcontext scaffold
    • dotnet ef dbcontext script
Powered by GitBook
On this page
  • dotnet new install --help
  • dotnet new install <nuget_package_id>
  1. Proje Şablon İşlemleri için Komutlar

dotnet new install

Search komutunu kullanarak NuGet.org üzerinde bulunan şablonları listelemiştik. Şimdi bu şablonlardan birini seçerek bilgisayarımıza yükleme işlemi yapalım.

İlk olarak --help opsiyonu ile komutumuz hakkında bilgi alalım.

dotnet new install --help

Komutumuzu kullandığımızda aşağıda görüldüğü üzere şablon paketi yükleyebileceğimiz açıklama kısmında belirtiliyor.

Şablon paketi yükleyebilmemiz için ilgili şablonun nuget package id değerini bilmemiz gerekiyor.

eg@debian:~$ dotnet new install --help
Description:
  Installs a template package.

Usage:
  dotnet new install <package>... [options]

Arguments:
  <package>  NuGet package ID or path to folder or NuGet package to install. 
             To install the NuGet package of certain version, use <package ID>::<version>.

Options:
  --interactive                                Allows the command to stop and wait for user input or action (for example to complete authentication).
  --add-source, --nuget-source <nuget-source>  Specifies a NuGet source to use during install.
  --force                                      Allows installing template packages from the specified sources even if they would override a template package from another source.
  -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 install <nuget_package_id>

Komutumuzu Microsoft.Maui.Templates şablonunu yüklemek için aşağıdaki gibi kullanalım. Görüldüğü üzere kullandıktan sonra başarılı bir şekilde .NET MAUI şablonları bilgisayarımıza yüklendi.

eg@debian:~$ dotnet new install Microsoft.Maui.Templates
The following template packages will be installed:
   Microsoft.Maui.Templates

Success: Microsoft.Maui.Templates::6.0.312 installed the following templates:
Template Name                        Short Name        Language  Tags                                                     
-----------------------------------  ----------------  --------  ---------------------------------------------------------
.NET MAUI App                        maui              [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/Windows/Tizen        
.NET MAUI Blazor App                 maui-blazor       [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/Windows/Tizen/Blazor 
.NET MAUI Class Library              mauilib           [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/Windows/Tizen        
.NET MAUI ContentPage (C#)           maui-page-csharp  [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/WinUI/Tizen/Xaml/Code
.NET MAUI ContentPage (XAML)         maui-page-xaml    [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/WinUI/Tizen/Xaml/Code
.NET MAUI ContentView (C#)           maui-view-csharp  [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/WinUI/Tizen/Xaml/Code
.NET MAUI ContentView (XAML)         maui-view-xaml    [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/WinUI/Tizen/Xaml/Code
.NET MAUI ResourceDictionary (XAML)  maui-dict-xaml    [C#]      MAUI/Android/iOS/macOS/Mac Catalyst/WinUI/Xaml/Code 

Previousdotnet new searchNextdotnet new uninstall

Last updated 1 year ago