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 publish --help
  • dotnet publish <project_file_path> --configuration <configuration_option>
  1. Proje Genel İşlemler için Komutlar

dotnet publish

dotnet publish --help

eg@debian:~$ dotnet publish --help
Description:
  Publisher for the .NET Platform

Usage:
  dotnet publish [<PROJECT | SOLUTION>...] [options]

Arguments:
  <PROJECT | SOLUTION>  The project or solution file to operate on. If a file is not specified, the command will search the current directory for one.

Options:
  --ucr, --use-current-runtime         Use current runtime as the target runtime.
  -o, --output <OUTPUT_DIR>            The output directory to place the published artifacts in.
  --manifest <MANIFEST>                The path to a target manifest file that contains the list of packages to be excluded from the publish step.
  --no-build                           Do not build the project before publishing. Implies --no-restore.
  --sc, --self-contained               Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine.
                                       The default is 'true' if a runtime identifier is specified.
  --no-self-contained                  Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your 
                                       application.
  --nologo                             Do not display the startup banner or the copyright message.
  -f, --framework <FRAMEWORK>          The target framework to publish for. The target framework has to be specified in the project file.
  -r, --runtime <RUNTIME_IDENTIFIER>   The target runtime to publish for. This is used when creating a self-contained deployment.
                                       The default is to publish a framework-dependent application.
  -c, --configuration <CONFIGURATION>  The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.
  --version-suffix <VERSION_SUFFIX>    Set the value of the $(VersionSuffix) property to use when building the project.
  --interactive                        Allows the command to stop and wait for user input or action (for example to complete authentication).
  --no-restore                         Do not restore the project before building.
  -v, --verbosity <LEVEL>              Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  -a, --arch <arch>                    The target architecture.
  --os <os>                            The target operating system.
  --disable-build-servers              Force the command to ignore any persistent build servers.
  -?, -h, --help                       Show command line help.

dotnet publish <project_file_path> --configuration <configuration_option>

eg@debian:~$ dotnet publish ./Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/ExampleSolution.ConsoleApp1.csproj --configuration Release
MSBuild version 17.6.8+c70978d4d for .NET
  Determining projects to restore...
  Restored /home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/ExampleSolution.ConsoleApp1.csproj (in 58 ms).
  ExampleSolution.ConsoleApp1 -> /home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Release/net7.0/ExampleSolution.ConsoleApp1.dll
  ExampleSolution.ConsoleApp1 -> /home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Release/net7.0/publish/
Previousdotnet cleanNextdotnet run

Last updated 1 year ago