ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

.NET CLI - dotnet publish: framework-dependent vs self-contained

.NET CLI

.NET Command-Line Interface

C#

dotnet new

Visual Studio Code

VSCode

Minimal API

.NET 6

CI/CD

Continuous Integration

Continuous Deployment

Mohammad Sahebhonar

msahebhonar

محمد صاحب هنر

.Net SDK

.Net Runtime

Asp.net Runtime

Mohammad

Sahebhonar

دکتر محمد صاحب هنر

dotnet new xunit

dotnet build

dotnet test

--collect:"XPlat Code Coverage"

reportgenerator

code coverage

coverage report

runtime identifier

no-self-contained

self-contained

dotnet publish

Автор: Mohammad Sahebhonar

Загружено: 2022-01-08

Просмотров: 2067

Описание: https://msahebhonar.com/CSharp/Progra...

Up to now, we saw how to develop, build, test, and run a project using .NET CLI. Now, we want to publish our application and its dependencies for deployment to a hosting system. In the finale of .NET CLI, we are going to use the .NET command-line interface to publish our application.
Based on how we want to run the app, we can publish the application in two different modes. If the hosting machine has .NET runtime, we can choose the framework-dependent mode to publish the app. The output includes only the application itself and its dependencies.
For .NET Core 3.1 or higher, the framework-dependent executable is the default mode for the dotnet publish command. The publish folder contains a cross-platform dll which is named after our project. The dotnet publish command also creates an executable for the current operating system and CPU architecture.
We can publish an app as framework-dependent that targets a specific platform. In this case, we need to use the runtime identifier along with the --no-self-contained option.
The framework-dependent mode has several advantages. Only the app and its dependencies are distributed, so the size of the deployment is small. We can run the app on different platforms. And the app uses the latest runtime installed on the target platform. However, the framework-dependent mode requires pre-installing of the .NET runtime on the host machine.
In the second mode, we can publish the app as a self-contained executable. The output includes the application, its dependencies, as well as the .NET runtime and libraries. So, we can run the application on a machine that doesn’t have the .NET runtime installed. In this mode, we need to specify the target runtime identifier as well as --sc option.
Since our app includes the .NET runtime and all of its dependencies the download size is greater than a framework-dependent version. Also, in the self-contained mode, greater hard drive space is required. As a caveat in this mode, the .NET Runtime can only be upgraded by releasing a new version of our app.
We can run the platform-specific executable directly. However, to run the cross-platform dll, we need to call the dotnet command.

00:00 - framework-dependent mode
01:54 - framework-dependent targets runtime
02:55 - advantages of framework-dependent mode
03:25 - self-contained mode
04:55 - run app.dll

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
.NET CLI - dotnet publish: framework-dependent vs self-contained

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]