HTML5¼¼Êõ

ºñ»ý±¡·¢£¬Óµ±§ .NET 2016 - ľÍð³ÇÖ÷

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2016-06-14 11:00 ÎÒÒªÆÀÂÛ( )

ºñ»ý±¡·¢£¬Óµ±§ .NET 2016 ºñ»ý±¡·¢Õâ¸ö´ÊÊǸßÈýÓ¢ÓïÀÏʦÔڸ߿¼Ç°Ð´ÔÚºÚ°åÉÏ£¬¸ßÖÐÈýÄêŬÁ¦Õâô¾Ã£¬ÊÇʱºòÓ­Ãæ¶øÉÏ£¬³å´ÌÏòÇ°¡£ËùÒÔ£¬Ò»Ïëµ½.NET 2016£¬ÄÔº£Àï±Ä³öµÄµÚÒ»¸ö´Ê¾ÍÊÇËü¡£ .NET 2016 ÊÇ .NET Ò»´ÎÖʵķÉÔ¾£¬²»¹ÜÄÑÒ×£¬ÎÒÃÇÐèÒªÓµ±§±ä»¯¡£ ³õʶ .N

ºñ»ý±¡·¢£¬Óµ±§ .NET 2016

ºñ»ý±¡·¢Õâ¸ö´ÊÊǸßÈýÓ¢ÓïÀÏʦÔڸ߿¼Ç°Ð´ÔÚºÚ°åÉÏ£¬¸ßÖÐÈýÄêŬÁ¦Õâô¾Ã£¬ÊÇʱºòÓ­Ãæ¶øÉÏ£¬³å´ÌÏòÇ°¡£ËùÒÔ£¬Ò»Ïëµ½.NET 2016£¬ÄÔº£Àï±Ä³öµÄµÚÒ»¸ö´Ê¾ÍÊÇËü¡£ .NET 2016 ÊÇ .NET Ò»´ÎÖʵķÉÔ¾£¬²»¹ÜÄÑÒ×£¬ÎÒÃÇÐèÒªÓµ±§±ä»¯¡£

³õʶ .NET 2016
  • .NET 2016 ¸ÅÀÀ
  • .NET 2016 ×÷Ϊ .NET ¼¼Êõ×îз¢Õ¹£¬ÈçÏÂͼËùʾ£¬ËüÖ÷Òª°üº¬Èý´ó¿é£º

    ×î×ó±ß´ú±íµÄÊÇ .NET Framework 4.6£¬WPF¡¢ASP.NET 4.x¡¢ASP.NET Core 1.0 ÄÜÔËÐÐÔÚËüÉÏ¡£ÖмäÕⲿ·Ö´ú±íµÄÊÇ .NET Core ¼¼Êõ£¬ASP.NET Core 1.0 ºÍ Universal Windows Platform£¨UWP£©ÄÜÔËÐÐÔÚËüÖ®ÉÏ¡£µ±È»£¬ÄãÒ²¿ÉÒÔ´´½¨¿ØÖÆ̨ӦÓóÌÐòÔËÐÐÔÚ.NET Core ÉÏ¡£×îÓÒ±ßÊÇ Xamarin,ËüÊÇÒ»¸ö»ùÓÚ Mono µÄ¿çƽ̨Òƶ¯¿ª·¢¿ò¼Ü¡£

    ÔÚ.NET 2015 ʱ£¬Î¢ÈíΪÎÒÃÇ´øÀ´ÁËÈ«Ð嵀 .NET£¬Ëü¾ÍÊÇ.NET Core¡£.NET Core µÄÒ»¸öÖØÒª×é³É²¿·ÖÊÇеÄÔËÐÐʱ£¨Runtime£©£ºCoreCLR¡£³ýÁËʹÓà CoreCLR ÔËÐÐʱÍ⣬.NET Ò²Äܱ»±àÒë³É Native Code¡£UWP ×Ô¶¯Ê¹ÓÃÕâ¸öÌØÐÔ£¬Ó¦ÓóÌÐòÔÚÌá½»µ½ Windows Store ºó±»±àÒë³É Native Code£¬×îÖÕÉú³ÉÓÅ»¯¹ýºóµÄ´úÂ룬¿ÉÒÔÈà APP Æô¶¯Ê±¼ä¼Ó¿ì²¢¿ÉÒÔ¼õÉÙÄÚ´æÏûºÄ ¡£Ä㵱ȻҲÄܱàÒëÆäËû.NET Core Ó¦ÓóÌÐò³É Native Code£¬²¢ÔÚLinuxÔËÐС£

    ÔÚÉÏͼµÄµ×²¿£¬Äã¿ÉÒÔ¿´µ½ÓÐһЩ¶«Î÷ÔÚ.NET Framework 4.6¡¢.NET Core¡¢Xamarin Ö®¼ä¹²Ïí¡£±ÈÈçһЩ¹²ÏíµÄLibraries£¬Í¨¹ý Nuget °üµÄ¸ÅÄÕâЩ Libraries »ã¼¯ÔÚ Package Öй©ËùÓеÄ.NET ƽ̨ʹÓ᣻¹ÓÐһЩÔËÐÐʱ×é¼þ£¨Runtime Components£©±»¹²Ïí,Èç GC ºÍ RyuJIT£¬ÕâÊÇÒ»¸öеÄJIT±àÒëÆ÷£¬Õâ¸öÐ嵀 JIT ±àÒëÆ÷²»½ö±ÈÒÔÇ°¸ü¿ì£¬ÔÚµ÷ÊÔʱËü»¹¾ßÓиüºÃµÄÖ§³Ö±à¼­ºÍ¼ÌÐø¹¦ÄÜ¡£Õâ¸ö¹¦ÄÜ¿ÉÒÔÔÚµ÷ÊÔʱ±à¼­´úÂë²¢¼ÌÐøµ÷ÊÔ£¬¶ø²»ÐèҪֹͣºÍÖØÐÂÆô¶¯½ø³Ì¡£CLR¡¢CoreCLR¡¢.NET Native ʹÓà GC ½øÐÐʵÀýµÄÏú»ÙÒÔ¼°ÄÚ´æµÄ»ØÊÕ£¬²¢ÇÒ CLR ºÍ CoreCLR ʹÓà RyuJIT ±àÒëÆ÷½« IL ´úÂë±àÒë³É Native Code ¡£µ±È»£¬ÐµıàÒëÆ÷ Roslyn Ò²Êǹ²ÏíµÄ¡£

  • .NET Framework 4.6
  • .NET Framework 4.6 ×÷Ϊ .NET Framework µÄ×îа汾£¬ÔÚ¹ýÈ¥ 10 ¶àÄê¼ä£¬²»¶Ï±»ÔöÇ¿¡£ÎÒÃÇÀûÓÃÕâ¸ö Framework ¹¹½¨ Windows Form ¡¢WPF¡¢ASP.NET 4 µÈÓ¦ÓóÌÐò¡£¾¡¹Ü ASP.NET Core Ó¦ÓóÌÐòÔËÐÐÔÚ.NET Core ÉÏ£¬µ«ËüÒ²ÄÜÔËÐÐÔÚ.NET Framework 4.6 ÉÏ¡£

    Èç¹ûÄãÏëÒª¼ÌÐøʹÓà ASP.NET Web Form ¿ª·¢Ó¦ÓóÌÐò£¬.ÄÇô NET Framework 4.6 ÖÐµÄ ASP.NET 4.6 ÊÇÄãµÄ×î¼ÑÑ¡Ôñ¡£ÖµµÃ×¢ÒâµÄÊÇÄã²»ÄÜÔÚ.NET Core ÉÏÔËÐÐ ASP.NET Web Form Ó¦ÓóÌÐò¡£

  • .NET Core 1.0
  • .NET Core 1.0£¨Ä¿Ç°ÊÇ RC2£©£¬ÊÇеÄ.NET£¬Ïà±ÈÓÚ Mono£¬ËüÊÇÕæÕýÒâÒåÉÏ¿çƽ̨µÄʵÏÖ¡£.NET Core ±»Éè¼Æ³ÉÄ£¿é»¯µÄ·½·¨£¬¼´±»·Ö¸î³É´óÁ¿µÄ Nuget Package¡£ÔÚÓ¦ÓóÌÐòÖУ¬Äã¾ö¶¨ÐèÒªÄÄЩ Package£¬²¢ÇÒËæʱ±£³Ö¸üкÍжÔØ¡£¶ø.NET Framework£¬ËüÊDzÙ×÷ϵͳµÄÒ»²¿·Ö£¬×¢¶¨²»ÄÜʵʱ±»¸üУ¬Í¬Ê±£¬¹ýÈ¥ 10 ¶àÄê¼þ£¬.NET Framework ¼ÓÈë·Ç³£¶àµÄй¦ÄÜ£¬Ëü±äµÃÔ½À´Ô½´ó£¬¸üÔã¸âµÄÊÇ£¬Ëü²»¿ÉÄÜÒƳý²»ÔÙÐèÒªµÄ¾É¹¦ÄÜ¡£±ÈÈç¾ÉµÄ¼¯ºÏÀ಻ÔÙ±»Ê¹ÓÃÒòΪ·ºÐͼ¯ºÏÀà¼ÓÈë,.NET Remoting ±»ÐµÄͨÐż¼Êõ WCF¡¢ASP.NET Web API Ìæ»»£¬LINQ to Sql ±» EntityFramework Ìæ»»¡£¶øÕâЩ¾É¼¼Êõ£¬Ò»Ö±´æÔÚ.NET Framework ÖУ¬Äã²»µÃ²»È«Å̽ÓÊÜËûÃÇ¡£

  • Xamarin
  • Mono ÊÇ¿ªÔ´ÉçÇø¿ª·¢µÄ¿çƽ̨.NET Framework£¬¶ø Xamarin ÊÇÒ»¸ö¹¹½¨ÓÚ Mono ÉÏ¿çƽ̨Òƶ¯Ó¦Óÿª·¢¿ò¼Ü¡£ÏàÐÅ΢ÈíÊÕ¹ºÁË Xamarin Ö®ºó£¬Mono ½«µÃµ½´óÁ¦Ö§³Ö£¬.NET Core ÔÚÒƶ¯¶ËµÄ±íÏÖÊÃÄ¿ÒÔ´ý¡£

    ʹÓà .NET Framework 4.6 ±àÒëÓ¦ÓóÌÐò

    ´´½¨ ¡°Hello World¡± Ó¦ÓóÌÐòÊÇѧϰһÃÅм¼ÊõµÄ¿ªÆª¡£ÔÚÕâ¶ù£¬ÎªÁ˸üºÃµÄÈ¥Àí½â.NET Core£¬ÎÒÃDz»´òËãȥʹÓÃVisual Studio 2015 ½øÐпª·¢¡£

  • Developer Command Prompt ±àÒë´úÂë
  • µ±°²×°Íê±Ï Visual Studio ºó£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÅäÌ×¹¤¾ß Developer Command Prompt ʹÓà C# ±àÒëÆ÷±àÒë´úÂë¡£

    1.´ò¿ª¼Çʱ¾£¬Ê¹Óà C# ±àдÈçÏ´úÂ룬ÃüÃûΪ HelloWorldApp.cs ²¢±£´æÖÁ C:\Code Îļþ¼Ð

    class Program { static void Main() { System.Console.WriteLine("Hello World");}}

    2.Æô¶¯ Developer Command Prompt for VS2015£¬¼üÈëÈçÏÂÃüÁ

    ÔËÐнá¹ûÈçÏÂËùʾ£º

    ×¢ÒâÄãµÄÔ´´úÂëÎļþ HelloWorldApp.cs£¬ÒѾ­±àÒëµ½³ÌÐò¼¯HelloWorldApp.exe ÖС£µ±ÄãÊäÈë HelloWorldApp ÃûÀ´ÔËÐÐÓ¦ÓóÌÐò£¬×îÖÕ±».NET Framework 4.6 ºÍËüµÄ CLR ¼ÓÔز¢ÔËÐС£

  • ʹÓà ILDASM ·´±àÒë³ÌÐò¼¯
  • 1.C# ±àÒëÆ÷½«Ô´´úÂëת»»³ÉIL´úÂëºó´æ´¢µ½³ÌÐò¼¯ÖУ¨DLL »òÕß EXE£©¡£

    2.IL ´úÂëÓï¾ä¾ÍÏñ»ã±àÓïÑÔÖ¸ÁËüÃDZ».NET µÄÐéÄâ»úÒ²¾ÍÊÇ CLRÖ´ÐС£ÔÚÔËÐÐʱ£¬CLR ´Ó³ÌÐò¼¯ÖмÓÔØ IL ´úÂ룬Ȼºó JIT ±àÒëÆ÷±àÒë³É Native Code£¬×îºó½»ÓÉ CPUÖ´ÐС£

    ÔÚ Developer Command Prompt ÊäÈë ildasm HelloWorldApp.exe£¬Äã»á¿´µ½ILDASM ¹¤¾ß¼ÓÔرàÒë¹ýºóµÄ³ÌÐò¼¯£º

    Ë«»÷ MANIFEST ½Úµã£¬²é¿´ÔªÊý¾Ý£º

    ¿ÉÒÔ¿´µ½.NET Metadata µÄ°æ±¾ÊÇ 4.0.30319,²¢ÇÒÒÀÀµÍⲿµÄ³ÌÐò¼¯mscorlib£¬ËüµÄ°æ±¾ÊÇ4.0.0.0£¬ÉÏÊö½Øͼ¸æËßÎÒÃÇ£¬ÒªÔËÐÐÕâ¸öÓ¦ÓóÌÐòÐèÒª°²×°.NET Framework 4.0ÒÔÉÏ¡£

    ¹Ø±Õ MANIFEST ´°¿Ú£¬ÔÙÕ¹¿ª Program ½Úµã£¬Ë«»÷ Main ·½·¨£º

    ×¢ÒâIL Ö¸Áldstr£¨load string £©£¬nop£¨no operation £©£¬call£¬ret£¨return£©¡£¼ÇסIL ×îÖÕ±» CLR Ö´ÐС£

    ʹÓà .NET Core CLI ±àÒëÓ¦ÓóÌÐò

    ҪʹÓÃ×îеÄ.NET Core Command Line(CLI)£¬ÇëÈ·±£°²×°ÁË.NET Core ºÍ CLI Tools¡£Äã¿ÉÒÔ·ÃÎÊ https://dotnet.github.io/ À´Îª Windows¡¢Linux¡¢OS X °²×°ËüÃÇ¡£

    ³É¹¦°²×°.NET Core CLI Tools Ö®ºó£¬¿ÉÒÔÔÚ Developer Command Prompt ¼üÈë dotnet help À´ ²é¿´¾ßÌåʹÓãº

  • ʹÓà CLI ´´½¨.NET Core Ó¦ÓóÌÐò
  • ÄãÐèҪͨ¹ý Developer Command Prompt ʹÓÃÈçÏÂÃüÁ

    1.ÔٴνøÈë C:\Code Îļþ¼Ð cd c:\code
    2.´´½¨ÐÂÎļþ¼Ð mkdir SecondApp
    3.½øÈëÐÂÎļþ¼Ð cd SecondApp
    4.ʹÓà CLI ´´½¨.NET CoreÓ¦ÓóÌÐò dotnet new
    5.²é¿´Ä¿Â¼½á¹¹ dir

    dotnet new ÃüÁî´´½¨ÁËÒ»¸öеÄ.NET Core Ó¦ÓóÌÐò£¬°üº¬Á½¸öÎļþ£¬·Ö±ðÊÇ Program.cs ºÍ project.json¡£

    ¡¡

    1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

    Ïà¹ØÎÄÕÂ
    • Dora.Interception: Ò»¸öΪ.NET Core¶ÈÉí¶¨ÖƵÄAOP¿ò¼Ü - Artech

      Dora.Interception: Ò»¸öΪ.NET Core¶ÈÉí¶¨ÖƵÄAOP¿ò¼Ü - Artech

      2017-05-02 11:00

    • ÈçºÎÔÚ ASP.NET Core Öз¢ËÍÓʼþ - Savorboard

      ÈçºÎÔÚ ASP.NET Core Öз¢ËÍÓʼþ - Savorboard

      2017-05-02 08:02

    • Ê®¶þ¸ö ASP.NET Core Àý×Ó - Savorboard

      Ê®¶þ¸ö ASP.NET Core Àý×Ó - Savorboard

      2017-04-27 16:01

    • ASP.NET MVC5ÇëÇó¹ÜµÀºÍÉúÃüÖÜÆÚ - Ñ©·Éºè

      ASP.NET MVC5ÇëÇó¹ÜµÀºÍÉúÃüÖÜÆÚ - Ñ©·Éºè

      2017-04-24 08:04

    ÍøÓѵãÆÀ
    ¹