{"id":18,"date":"2026-08-30T21:35:37","date_gmt":"2026-08-30T13:35:37","guid":{"rendered":"https:\/\/blog.gzecent.com\/?p=18"},"modified":"2026-09-25T15:28:48","modified_gmt":"2026-09-25T07:28:48","slug":"%e4%bd%bf%e7%94%a8%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%88%9b%e5%bb%badotnet-ios-android%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/blog.gzecent.com\/en\/2026\/08\/30\/%e4%bd%bf%e7%94%a8%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%88%9b%e5%bb%badotnet-ios-android%e9%a1%b9%e7%9b%ae\/","title":{"rendered":"Create a .NET iOS\/Android project using the command line"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Visual Studio provides a convenient graphical project creation feature for users: simply create a new project and follow the prompts step by step until completion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, this approach also brings some issues. A particularly real example is that users during the Xamarin era were aware that, apart from Xamarin.Forms, there were also Xamarin.iOS and Xamarin.Android. At that time, Visual Studio allowed users to select either Xamarin.iOS or Xamarin.Android when creating a new project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, from the evolution of Xamarin to the current DotNet, the new project template in Visual Studio is only available in MAUI. You couldn't find the options for Dotnet Android and Dotnet iOS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, DotNet Android and DotNet iOS have always existed as underlying implementations of maui, it's just that Microsoft hasn't implemented their new project functionality in Visual Studio. If developers are familiar with the using of development method on Xamarin.iOS or Xamarin.Android and want to continue using this method in the current DotNet era, they only need to use DotNet command-line tools(CLI).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are a user using a non Windows system, you should be very familiar with the DotNet command line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dotnet new<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"678\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-21e3b4b3b606c914125a789cf8d686e8_1440w.png\" alt=\"\" class=\"wp-image-25\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-21e3b4b3b606c914125a789cf8d686e8_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-21e3b4b3b606c914125a789cf8d686e8_1440w-300x199.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-21e3b4b3b606c914125a789cf8d686e8_1440w-768x509.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-21e3b4b3b606c914125a789cf8d686e8_1440w-18x12.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As shown in the figure, \"dotnet new\" only displays commonly used project templates. To display all installed templates, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dotnet new list<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-134b586b6f48577530d4a6e999be0476_1440w.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-134b586b6f48577530d4a6e999be0476_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-134b586b6f48577530d4a6e999be0476_1440w-300x160.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-134b586b6f48577530d4a6e999be0476_1440w-768x410.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-134b586b6f48577530d4a6e999be0476_1440w-18x10.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"561\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-386e49987a4669b81e3e343a8116b424_1440w.png\" alt=\"\" class=\"wp-image-26\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-386e49987a4669b81e3e343a8116b424_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-386e49987a4669b81e3e343a8116b424_1440w-300x164.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-386e49987a4669b81e3e343a8116b424_1440w-768x421.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-386e49987a4669b81e3e343a8116b424_1440w-18x10.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9ebae53be4130784da62eeaed3265fd3_1440w.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9ebae53be4130784da62eeaed3265fd3_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9ebae53be4130784da62eeaed3265fd3_1440w-300x163.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9ebae53be4130784da62eeaed3265fd3_1440w-768x416.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9ebae53be4130784da62eeaed3265fd3_1440w-18x10.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As shown in the figure, simply find the template you need in this list and then create a new one, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dotnet new ios<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9daf26d47ce1ba0dbf9b68a81e5a22d8_1440w.png\" alt=\"\" class=\"wp-image-24\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9daf26d47ce1ba0dbf9b68a81e5a22d8_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9daf26d47ce1ba0dbf9b68a81e5a22d8_1440w-300x76.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9daf26d47ce1ba0dbf9b68a81e5a22d8_1440w-768x194.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-9daf26d47ce1ba0dbf9b68a81e5a22d8_1440w-18x5.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"440\" src=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-cbd37af4bbedcb1380339a66f5d8a64a_1440w.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-cbd37af4bbedcb1380339a66f5d8a64a_1440w.png 1024w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-cbd37af4bbedcb1380339a66f5d8a64a_1440w-300x129.png 300w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-cbd37af4bbedcb1380339a66f5d8a64a_1440w-768x330.png 768w, https:\/\/blog.gzecent.com\/wp-content\/uploads\/2026\/09\/v2-cbd37af4bbedcb1380339a66f5d8a64a_1440w-18x8.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The current example is being operated on Mac, and even with the implementation of DotNet across platforms, it is not a problem to use these DotNet command-line tools(CLI) on Windows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u516c\u4f17\u53f7 Maui Library<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u77e5\u4e4e Maui Library<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7fa4\uff1a 521288080 313308215<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Visual Studio\u4e3a\u7528\u6237\u521b\u5efa\u9879\u76ee\u7684\u65f6\u5019\u5e26\u6765\u4e86\u5f88\u4fbf\u6377\u7684\u56fe\u5f62\u5316\u521b\u5efa\u9879\u76ee\u529f\u80fd\uff1a\u65b0\u5efa\u9879\u76ee\uff0c\u6309\u63d0\u793a\u9009\u62e9\u4e0b\u4e00\u6b65\u76f4\u5230 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":19,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-maui"],"_links":{"self":[{"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":10,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/posts\/18\/revisions\/101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/media\/19"}],"wp:attachment":[{"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gzecent.com\/en\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}