Cov txheej txheem:

Kuv yuav ua li cas khiav a.NET core app hauv Linux?
Kuv yuav ua li cas khiav a.NET core app hauv Linux?

Video: Kuv yuav ua li cas khiav a.NET core app hauv Linux?

Video: Kuv yuav ua li cas khiav a.NET core app hauv Linux?
Video: ? Что такое многополосный 6 атомный хронометраж ? То 2024, Kaum ib hlis
Anonim

1 Teb

  1. Tshaj tawm koj daim ntawv thov raws li tus kheej muaj daim ntawv thov : dotnet publish -c tso -r ubuntu .
  2. Luam cov ntawv luam tawm mus rau lub Ubuntu tshuab.
  3. Qhib lub Ubuntu tshuab davhlau ya nyob twg (CLI) thiab mus rau qhov project directory.
  4. Muab ua tso cai: chmod 777./appname.
  5. Ua kom tiav tus daim ntawv thov ./appname.

Ntawm no, kuv yuav ua li cas khiav. NET core console app ntawm Linux?

Yuav ua li cas khiav. Net Core console app ntawm Linux

  1. Tshaj tawm koj daim ntawv thov raws li tus kheej muaj daim ntawv thov: dotnet luam tawm -c tso -r ubuntu.16.04-x64.
  2. Luam tawm cov ntawv tais ceev tseg rau ubuntu tshuab.
  3. Qhib ubuntu tshuab davhlau ya nyob twg (CLI) thiab mus rau qhov project directory.
  4. Muab kev tso cai ua haujlwm: chmod 777./appname.
  5. Ua daim ntawv thov.

Tsis tas li ntawd, kuv yuav ua li cas thiaj li khiav. NET core application hauv Ubuntu? NET Core runtime ntawm lub server.

  1. Mus saib lub Download. NET Core page.
  2. Xaiv qhov tseeb uas tsis yog saib ua ntej. NET Core version.
  3. Download tau qhov tseeb uas tsis yog saib ua ntej hauv lub rooj hauv Khiav apps - Runtime.
  4. Xaiv lub Linux Package manager cov lus qhia txuas thiab ua raws Ubuntu cov lus qhia rau koj lub version ntawm Ubuntu.

Cov lus nug tseem yog, Kuv tuaj yeem khiav. NET core ntawm Linux?

Thaum lub hom phiaj yog mus khiav koj daim ntawv thov ntawm ntau lub platforms-Windows, MacOS, lossis Linux , mus-mus yog. NET Core -ua tsaug rau lub sijhawm ua haujlwm (CoreCLR) thiab cov tsev qiv ntawv hla lub platform. NET Core tso cai siv nws kuj ntawm Mac los yog Linux ntawm Visual Studio Code. Cov software no kuj suav nrog IntelliSense thiab debugging.

. NET core cross platform li cas?

NET Core yog ntoo khaub lig - platform . Nws khiav ntawm Windows, OS X thiab ntau qhov kev faib tawm ntawm Linux. Nws kuj txhawb CPU architectures sib txawv. NET Core Nws yog ib qho tseem ceeb modular nyob rau hauv nws tsim thiab architecture.

Pom zoo: