尊龙凯时人生就是博

ÔÚLinuxÉÏʹÓÃVisual Studio¾ÙÐÐC#¿ª·¢µÄÍƼöÉèÖÃ

ÔÚlinuxÉÏʹÓÃvisual studio¾ÙÐÐc#¿ª·¢µÄÍƼöÉèÖÃ

ͻ񻣼

Linux²Ù×÷ϵͳһֱ±»¿í´ó¿ª·¢ÕßËùϲ»¶ £¬¿ÉÊǺã¾ÃÒÔÀ´ £¬C#¿ª·¢ÔÚLinuxϵͳÉϲ¢²»ÊǺÜÀû±ã¡£È»¶ø £¬Ëæ×Å΢Èí¶ÔLinuxµÄÖ§³Ö £¬ÏÖÔÚÒѾ­ÓпÉÄÜÔÚLinuxÉÏʹÓÃVisual Studio¾ÙÐÐC#¿ª·¢¡£±¾ÎĽ«ÏÈÈÝÒ»ÖÖÍƼöµÄÉèÖÃÒªÁì £¬²¢ÌṩÏêϸµÄ´úÂëʾÀý¡£

СÐò£º

ʹC#¿ª·¢ÔÚLinuxÉϳÉΪ¿ÉÄܵÄÒªº¦ÊÇ΢ÈíÍƳöµÄ.NET CoreÊÖÒÕ¡£.NET CoreÊÇÒ»¸ö¿ªÔ´µÄ¿çƽ̨¿ª·¢¿ò¼Ü £¬Ëü¿ÉÒÔÔËÐÐÔÚWindows¡¢LinuxºÍmacOSÉÏ¡£³ýÁËVisual Studio £¬Äú»¹¿ÉÒÔʹÓÃÀàËÆVS CodeÕâÑùµÄÇáÁ¿¼¶±à¼­Æ÷¾ÙÐÐC#¿ª·¢¡£ÒÔÏÂÊÇÎÒÍƼöµÄÉèÖÃÒªÁì £¬Ï£Íû¶ÔÄúÓÐ×ÊÖú¡£

°ì·¨Ò»£º×°ÖÃ.NET Core SDK

ÔÚLinuxÉϾÙÐÐC#¿ª·¢ £¬Ê×ÏÈÐèҪװÖÃ.NET Core SDK¡£Äú¿ÉÒÔ´Ó΢Èí¹ÙÍøÏÂÔØÊʺÏÄúµÄLinux¿¯ÐаæµÄSDK £¬²¢Æ¾Ö¤¹Ù·½Îĵµ¾ÙÐÐ×°Öá£×°ÖÃÍê³Éºó £¬Äú¿ÉÒÔÔÚÖÕ¶ËÖÐÔËÐÐdotnet –versionÏÂÁîÀ´Ñé֤װÖÃÊÇ·ñÀֳɡ£

°ì·¨¶þ£º×°ÖÃVisual Studio Code

ËäÈ»Visual Studio CodeÊÇÒ»¸öÇáÁ¿¼¶±à¼­Æ÷ £¬µ«Ëü¶ÔC#¿ª·¢µÄÖ§³ÖÏ൱¾«²Ê¡£Äú¿ÉÒÔÔÚVisual Studio CodeµÄ¹Ù·½ÍøÕ¾ÏÂÔØÊʺÏÄúµÄLinux¿¯ÐаæµÄ×°Öðü £¬²¢¾ÙÐÐ×°Öá£×°ÖÃÍê³Éºó £¬Äú¿ÉÒÔ½øÒ»²½ÌáÉý±à¼­Æ÷µÄC#Ö§³Ö £¬ÀýÈç×°ÖÃC#À©Õ¹²å¼þµÈ¡£

°ì·¨Èý£º½¨ÉèC#ÏîÄ¿

ÏÖÔÚÄú¿ÉÒÔ×îÏȽ¨ÉèC#ÏîÄ¿ÁË¡£ÔÚÖÕ¶ËÖнøÈëÄúµÄÊÂÇéĿ¼ £¬²¢ÔËÐÐÒÔÏÂÏÂÁÉèÒ»¸ö¿ÕµÄC#ÏîÄ¿£º

dotnet new console -n MyProject

µÇ¼ºó¸´ÖÆ

Õ⽫»áÔÚÄ¿½ñĿ¼Ï½¨ÉèÒ»¸öÃûΪMyProjectµÄ¿ÕµÄC# consoleÓ¦ÓóÌÐò¡£Äú¿ÉÒÔʹÓÃÈκÎÎı¾±à¼­Æ÷·­¿ª¸ÃÏîÄ¿ £¬¿ÉÊÇΪÁ˸üºÃµÄ¿ª·¢ÌåÑé £¬ÎÒÍƼöʹÓÃVisual Studio Code¾ÙÐб༭¡£

°ì·¨ËÄ£ºÔÚVisual Studio CodeÖз­¿ªÏîÄ¿

ÔÚVisual Studio CodeÖÐ £¬°´ÏÂCtrl+O·­¿ªÎļþ £¬È»ºóÑ¡ÔñÄú֮ǰ½¨ÉèµÄMyProjectÎļþ¼Ð¡£Visual Studio Code»á×Ô¶¯¼ì²âµ½¸ÃÎļþ¼ÐÊÇC#ÏîÄ¿ £¬²¢Æ¾Ö¤ÐèÒª¼ÓÔØËùÐèµÄÀ©Õ¹²å¼þ¡£ÏÖÔÚÄú¾Í¿ÉÒÔÔÚVisual Studio CodeÖб༭ºÍÔËÐÐÄúµÄC#ÏîÄ¿ÁË¡£

Àý×Ó£º

¼ÙÉèÎÒÃÇÒª±àдһ¸ö¼òÆӵĿØÖÆ̨³ÌÐò £¬ÓÃÓÚ´òÓ¡”Hello, World!”¡£ÇëÔÚVisual Studio CodeÖз­¿ªÄúµÄC#ÏîÄ¿ £¬²¢·­¿ªProgram.csÎļþ¡£

using System;

namespace MyProject
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            Console.ReadLine();
        }
    }
}

µÇ¼ºó¸´ÖÆ

ÔÚÖÕ¶ËÖÐʹÓÃÒÔÏÂÏÂÁî±àÒë²¢ÔËÐиóÌÐò£º

dotnet build
dotnet run

µÇ¼ºó¸´ÖÆ

Äú½«ÔÚÖÕ¶ËÖп´µ½Êä³öµÄЧ¹ûΪ”Hello, World!”¡£

×ܽ᣺

ͨ¹ýÒÔÉϵÄÉèÖúÍʾÀý £¬ÄúÏÖÔÚÓ¦¸ÃÄܹ»ÔÚLinuxÉÏʹÓÃVisual Studio¾ÙÐÐC#¿ª·¢ÁË¡£Ëæ×Å.NET CoreµÄÒ»Ö±¸üкÍˢР£¬Äú¿ÉÒÔÆÚ´ý¸üºÃµÄ¿ª·¢ÌåÑéºÍ¸ü¸ßµÄÐÔÄÜ¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú £¬×£ÄúÏíÊÜÔÚLinuxÉϾÙÐÐC#¿ª·¢µÄÐËȤ£¡

ÒÔÉϾÍÊÇÔÚLinuxÉÏʹÓÃVisual Studio¾ÙÐÐC#¿ª·¢µÄÍƼöÉèÖõÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ