dotnet aks api template
1.0.0
Template dotnet new untuk membuat API Web Core ASP.NET Core untuk AKS.
dotnet new -i RobBell.AksApi.Template
Template diselesaikan dari repositori Nuget resmi.
Untuk membuat proyek baru bernama Myapi :
dotnet new aksapi -n MyApi
Opsi lain termasuk:
--controller-name The name of the default controller
Default: SampleController
--disable-open-api Disable OpenAPI (Swagger) support
Default: false
--disable-health-check Disable liveness and readiness support
Default: false
--disable-logging Disable Logging and AppInsights support
Default: false
--instrumentation-key The AppInsights application key if logging is enabled
Default: 11111111-1111-1111-11111111111111111
--skip-restore Skips the restore of the project on create
Default: false
dotnet restore dotnet new 1: 1 dengan repositori? Setelah membuat perubahan pada templat, jalankan skrip di bawah ini untuk mengemas dan menginstal secara lokal:
./pack-and-install.sh
Setelah selesai, Anda dapat membuat proyek baru dari templat menggunakan:
dotnet new aksapi
Mencoba:
dotnet new -i RobBell.AksApi.Template --nuget-source https://api.nuget.org/v3/index.json
Terkadang Anda mungkin memiliki repositori nuget pribadi di sumber paket Anda yang mengganggu pemasangan templat dari repo resmi. Misalnya:
C:Program Filesdotnetsdk3.1.403NuGet.targets(128,5):
error : Unable to load the service index for source https://myprivatenugetrepo.com/nuget/v3/index.json.
C:Program Filesdotnetsdk3.1.403NuGet.targets(128,5):
error : Response status code does not indicate success: 401 (Unauthorized).