You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
84 KiB
HTML

1 year ago
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-template" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">2.6 官方脚手架 | Furion</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="http://furion.baiqian.ltd/docs/template"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="2.6 官方脚手架 | Furion"><meta data-rh="true" name="description" content="快速创建生产级项目解决方案"><meta data-rh="true" property="og:description" content="快速创建生产级项目解决方案"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="http://furion.baiqian.ltd/docs/template"><link data-rh="true" rel="alternate" href="http://furion.baiqian.ltd/docs/template" hreflang="en"><link data-rh="true" rel="alternate" href="http://furion.baiqian.ltd/docs/template" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Furion RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Furion Atom Feed"><link rel="stylesheet" href="/assets/css/styles.3f87a095.css">
<script src="/assets/js/runtime~main.89709a83.js" defer="defer"></script>
<script src="/assets/js/main.10e5dc01.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const a=new URLSearchParams(window.location.search).entries();for(var[t,e]of a)if(t.startsWith("docusaurus-data-")){var n=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(n,e)}}catch(t){}}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus"><div class="floatbar_hUWl"><div class="qrcode_sWwE"><img title="微信扫码关注 Furion 官方公众号" src="/img/weixin_qrcode.jpg" style="display:block"><div>❤️ 关注 Furion 微信公众号有惊喜哦!</div></div><div style="display:flex;flex-direction:row-reverse;align-items:flex-start"><div class="title_SD0k">🫠 遇到问题了</div><div class="extend__5i1"><a class="item_Y35a" href="/docs/subscribe"><div style="flex:1"><div class="itemTitle_If_T">⭐️ VIP 服务 ⭐️</div><div class="itemDesc_dp7r">仅需 499 元/年,尊享 365 天项目无忧</div></div><div class="jiantou_mV_o"></div></a><div class="item_Y35a"><div style="flex:1"><div class="itemTitle_If_T">问题反馈</div><div class="itemDesc_dp7r">到 Furion 开源仓库反馈</div></div><div class="jiantou_mV_o"></div></div></div></div></div><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><div class="announcementBar_mb4j" style="background-color:#4623d9;color:yellow" role="banner"><div class="content_knG7 announcementBarContent_xLdY">⭐️ 开通 VIP 服务仅需 499 元/年,尊享 365 天项目无忧 <a href="/docs/subscribe" style="background-color:rgb(199, 29, 36);color:#ffffff;padding:1px 10px;border-radius:3px;text-decoration:none;display:inline-block;margin:0 5px;font-size:12px;cursor:pointer;">立即开通</a>⭐️</div></div><nav aria-label="Main" class="navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/furionlogo.png" alt="Furion Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/furionlogo.png" alt="Furion Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Furion</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/category/appendix">文档</a><a class="navbar__item navbar__link" href="/docs/global/app">静态类</a><a class="navbar__item navbar__link" href="/docs/settings/appsettings">配置</a><a class="navbar__item navbar__link" href="/blog">博客</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">更新日志</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/upgrade">📝 查看日志v4.9.1.7</a></li><li><a class="dropdown__link" href="/docs/target">🚀 路线图</a></li></ul></div><a href="http://furion.baiqian.ltd/api/api" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">API<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__it
<li>
<p><strong>突破性变化</strong></p>
<ul>
<li> <label class="label_p8vM" title="升级" style="background-color:#e03997"><svg viewBox="0 0 1024 1024" width="14px" height="14px" style="display:block" class="icon_knQK"><path d="M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z" fill="white"></path><path d="M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z" fill="white"></path><path d="M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z" fill="white"></path></svg> <!-- -->升级</label> <strong>脚手架支持创建 <code>.NET8 Preview.1</code> 项目</strong> <sup>4.8.7</sup> <sup>2023.02.22</sup></li>
</ul>
</li>
<li>
<p><strong>问题修复</strong></p>
<ul>
<li> <label class="label_p8vM" title="修复" style="background-color:#9c26b0"><svg viewBox="0 0 1024 1024" width="14px" height="14px" style="display:block" class="icon_knQK"><path d="M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 34.8-28.2 63-63 63H232c-34.8 0-63-28.2-63-63 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5 0.2 13 0.7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7 6 17.2 13.6 33.6 22.7 49 24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2c41.5-24.3 76.2-59 100.5-100.5 9.1-15.5 16.7-31.9 22.7-49C812.1 793.1 836 831.8 836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7 0.4-6.4 0.7-12.8 0.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3-20.1 11.8-42 20-64.9 24.3V484c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v396.5c-22.9-4.3-44.8-12.5-64.9-24.3-30.3-17.7-55.6-43-73.3-73.3C317.7 752 308 716.8 308 680V412h408v268z" fill="white"></path><path d="M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1-17.2-31.5-42.5-56.8-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9-31.5 17.2-56.8 42.5-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z" fill="white"></path></svg> <!-- -->修复</label> <code>Blazor</code> 脚手架出现 <code>blazor.server.js</code> 不能加载问题(<code>404</code> <sup>4.8.7.13</sup> <sup>2023.03.16</sup> <a href="https://gitee.com/dotnetchina/Furion/issues/I6NOBQ" target="_blank" rel="noopener noreferrer">#I6NOBQ</a></li>
</ul>
</li>
<li>
<p><strong>其他更改</strong></p>
<ul>
<li> <label class="label_p8vM" title="调整" style="background-color:#333"><svg viewBox="0 0 1024 1024" width="14px" height="14px" style="display:block" class="icon_knQK"><path d="M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z" fill="white"></path></svg> <!-- -->调整</label> <code>Blazor</code> + <code>WebAPI</code> 脚手架模板,默认添加授权支持 <sup>4.8.7.37</sup> <sup>2023.04.07</sup> <a href="https://gitee.com/dotnetchina/Furion/issues/I6OM8O" target="_blank" rel="noopener noreferrer">#I6OM8O</a> <a href="https://gitee.com/dotnetchina/Furion/commit/544f80dbd7c800e28d9c4137e1c3bfc289c14177" target="_blank" rel="noopener noreferrer">544f80d</a></li>
<li> <label class="label_p8vM" title="调整" style="background-color:#333"><svg viewBox="0 0 1024 1024" width="14px" height="14px" style="display:block" class="icon_knQK"><path d="M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z" fill="white"></path></svg> <!-- -->调整</label> 脚手架模板,默认启用主流文件类型 <code>MIME</code> 支持 <sup>4.8.7.5</sup> <sup>2023.03.07</sup> <a href="https://gitee.com/dotnetchina/Furion/commit/e35cdab592d1a00ff32b08c566c4ed5d6ddcff24" target="_blank" rel="noopener noreferrer">e35cdab</a></li>
</ul>
</li>
</ul></div></div></div></div></details>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>特别说明</div><div class="admonitionContent_BuS1"><p><strong>脚手架不是安装在项目中的!</strong> 而是通过 <code>CMD</code><code>PowerShell</code> 安装到操作系统中的。</p></div></div>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="261-脚手架">2.6.1 脚手架<a href="#261-脚手架" class="hash-link" aria-label="Direct link to 2.6.1 脚手架" title="Direct link to 2.6.1 脚手架"></a></h2>
<p><code>Furion</code> 官方提供了多种 <code>Web</code> 应用类型的脚手架,方便大家快速创建多层架构项目。目前支持以下应用脚手架:</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="2611-furion--efcore">2.6.1.1 <code>Furion + EFCore</code><a href="#2611-furion--efcore" class="hash-link" aria-label="Direct link to 2611-furion--efcore" title="Direct link to 2611-furion--efcore"></a></h3>
<table><thead><tr><th style="text-align:center">模板类型</th><th>名称</th><th>版本</th><th>关键词</th><th>描述</th></tr></thead><tbody><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.Mvc/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.Mvc</td><td><a href="https://www.nuget.org/packages/Furion.Template.Mvc/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.Mvc.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionmvc</strong></td><td>Mvc 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.Api/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.Api</td><td><a href="https://www.nuget.org/packages/Furion.Template.Api/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.Api.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionapi</strong></td><td>WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.App/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.App</td><td><a href="https://www.nuget.org/packages/Furion.Template.App/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.App.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionapp</strong></td><td>Mvc/WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.Razor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.Razor</td><td><a href="https://www.nuget.org/packages/Furion.Template.Razor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.Razor.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionrazor</strong></td><td>RazorPages 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.RazorWithWebApi/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.RazorWithWebApi</td><td><a href="https://www.nuget.org/packages/Furion.Template.RazorWithWebApi/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.RazorWithWebApi.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionrazorapi</strong></td><td>RazorPages/WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.Blazor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.Template.Blazor</td><td><a href="https://www.nuget.org/packages/Furion.Template.Blazor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.Template.Blazor.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>furionblazor</strong></td><td>Blazor 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.Template.BlazorWithWebApi/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="2612-furion--sqlsugar">2.6.1.2 <code>Furion + SqlSugar</code><a href="#2612-furion--sqlsugar" class="hash-link" aria-label="Direct link to 2612-furion--sqlsugar" title="Direct link to 2612-furion--sqlsugar"></a></h3>
<table><thead><tr><th style="text-align:center">模板类型</th><th>名称</th><th>版本</th><th>关键词</th><th>描述</th></tr></thead><tbody><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Mvc/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.Mvc</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Mvc/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.Mvc.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsmvc</strong></td><td>Mvc 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Api/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.Api</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Api/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.Api.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsapi</strong></td><td>WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.App/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.App</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.App/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.App.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsapp</strong></td><td>Mvc/WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Razor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.Razor</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Razor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.Razor.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsrazor</strong></td><td>RazorPages 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.RazorWithWebApi/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.RazorWithWebApi</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.RazorWithWebApi/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.RazorWithWebApi.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsrazorapi</strong></td><td>RazorPages/WebApi 模板</td></tr><tr><td style="text-align:center"><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Blazor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://shields.io/badge/-NuGet-yellow?cacheSeconds=604800" alt="nuget" class="img_ev3q"></a></td><td>Furion.SqlSugar.Template.Blazor</td><td><a href="https://www.nuget.org/packages/Furion.SqlSugar.Template.Blazor/" target="_blank" rel="noopener noreferrer"><img loading="lazy" src="https://img.shields.io/nuget/v/Furion.SqlSugar.Template.Blazor.svg?cacheSeconds=10800" alt="nuget" class="img_ev3q"></a></td><td>👉 <strong>fsblazor</strong></td><td>Blazor 模板</td></tr><tr><td style="text-align:center"><a href="https:
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="262-安装脚手架">2.6.2 安装脚手架<a href="#262-安装脚手架" class="hash-link" aria-label="Direct link to 2.6.2 安装脚手架" title="Direct link to 2.6.2 安装脚手架"></a></h2>
<p>打开 <code>CMD</code><code>Powershell</code> 执行模板安装命令(旧版本 <code>install</code> 可换成 <code>--install</code></p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="2621-furion--efcore-脚手架安装">2.6.2.1 <code>Furion + EFCore</code> 脚手架安装<a href="#2621-furion--efcore-脚手架安装" class="hash-link" aria-label="Direct link to 2621-furion--efcore-脚手架安装" title="Direct link to 2621-furion--efcore-脚手架安装"></a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_e6Vv codeBlockLinesWithNumbering_o6Pm"><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Mvc 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.Mvc::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.Api::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Mvc/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.App::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># RazorPages 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.Razor::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># RazorPages/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.RazorWithWebApi::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Blazor 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.Blazor::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Blazor/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.BlazorWithWebAPI::4.9.1.7</span></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>最新版安装</div><div class="admonitionContent_BuS1"><p>不带版本号总是安装最新的版本。</p></div></div>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="2622-furion--sqlsugar-脚手架安装">2.6.2.2 <code>Furion + SqlSugar</code> 脚手架安装<a href="#2622-furion--sqlsugar-脚手架安装" class="hash-link" aria-label="Direct link to 2622-furion--sqlsugar-脚手架安装" title="Direct link to 2622-furion--sqlsugar-脚手架安装"></a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_e6Vv codeBlockLinesWithNumbering_o6Pm"><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Mvc 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.Mvc::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.Api::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Mvc/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.App::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># RazorPages 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.Razor::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># RazorPages/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.RazorWithWebApi::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Blazor 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.Blazor::4.9.1.7</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># Blazor/WebApi 模板</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.SqlSugar.Template.BlazorWithWebAPI::4.9.1.7</span></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"><
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>最新版安装</div><div class="admonitionContent_BuS1"><p>不带版本号总是安装最新的版本。</p></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span><code>SqlSugar</code> 脚手架基本使用</div><div class="admonitionContent_BuS1"><p><code>SqlSugar</code> 脚手架中,<code>Core</code> 层包含了一个 <code>DbContext.cs</code> 类,可通过 <code>DbContext.Instance</code> 就可以获取到 <code>SqlSugarScope</code> 对象。</p><p>数据库链接字符串在启动层 <code>appsettings.json</code> 文件的 <code>ConnectionConfigs</code> 节点中配置,对应的是 <code>SqlSugar</code> 中的 <code>ConnectionConfig[]</code> 对象。</p></div></div>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="263-使用脚手架">2.6.3 使用脚手架<a href="#263-使用脚手架" class="hash-link" aria-label="Direct link to 2.6.3 使用脚手架" title="Direct link to 2.6.3 使用脚手架"></a></h2>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_e6Vv codeBlockLinesWithNumbering_o6Pm"><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># 命令模板如下</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new 关键词 -n 项目名称 -f .NET版本</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain" style="display:inline-block"></span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># EFCore支持创建 .NET5-8 版本</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new furionapi -n MyProject -f net5</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new furionapi -n MyProject -f net6</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new furionapi -n MyProject -f net7</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new furionapi -n MyProject -f net8</span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain" style="display:inline-block"></span></span><br></span><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain"># SqlSugar支持创建 .NET5-8 版本</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new fsapi -n MyProject -f net5</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new fsapi -n MyProject -f net6</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new fsapi -n MyProject -f net7</span></span><br></span><span class="token-line theme-code-block-highlighted-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new fsapi -n MyProject -f net8</span></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7
<p>这样就可以生成项目代码了,<strong>生成之后推荐将所有的 <code>nuget</code> 包更新到最新版本。</strong></p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>关于项目名称和 <code>.NET</code> 版本</div><div class="admonitionContent_BuS1"><p>通过脚手架生成的项目名称不能包含 <code>短横线</code> 等特殊字符,如有该需求,可在生成之后通过 <code>Visual Studio</code> 进行手动修改。</p><p><code>-f</code> 版本参数所有选项:<code>net5</code><code>net6</code><code>net7</code><code>net8</code>,默认是 <code>net8</code></p></div></div>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>特别提醒</div><div class="admonitionContent_BuS1"><p><code>furionapi</code> 对应的是上面列表的 <code>关键词</code>,我们也可以通过 <code>dotnet new --list</code> 查看。</p><p>想了解更多可以使用 <code>dotnet new 关键词 --help</code> 查看更多参数。</p></div></div>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="264-脚手架更新">2.6.4 脚手架更新<a href="#264-脚手架更新" class="hash-link" aria-label="Direct link to 2.6.4 脚手架更新" title="Direct link to 2.6.4 脚手架更新"></a></h2>
<p>只需要重新安装最新版替换即可,如:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_e6Vv codeBlockLinesWithNumbering_o6Pm"><span class="token-line codeLine_lJS_" style="color:#bfc7d5"><span class="codeLineNumber_Tfdd"></span><span class="codeLineContent_feaV"><span class="token plain">dotnet new install Furion.Template.Api::4.9.1.7</span></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>最新版安装</div><div class="admonitionContent_BuS1"><p>不带版本号总是安装最新的版本。</p></div></div>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="265-visual-studio-集成">2.6.5 <code>Visual Studio</code> 集成<a href="#265-visual-studio-集成" class="hash-link" aria-label="Direct link to 265-visual-studio-集成" title="Direct link to 265-visual-studio-集成"></a></h2>
<p>通过命令安装脚手架后,升级 <code>Visual Studio</code> 到最新版可使用可视化方式创建哦。</p>
<img src="/img/ksh.png">
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="266-关于-mvc-添加区域出错问题">2.6.6 <code>关于 MVC 添加区域出错问题</code><a href="#266-关于-mvc-添加区域出错问题" class="hash-link" aria-label="Direct link to 266-关于-mvc-添加区域出错问题" title="Direct link to 266-关于-mvc-添加区域出错问题"></a></h2>
<p>由于 <code>Furion</code> 底层依赖了 <code>Microsoft.CodeAnalysis.CSharp</code> 包,所以可能通过 <code>Viusal Studio</code> 的界面添加 <code>Area 区域</code> 时会出错,这时候只需要在 <code>Web.Entry</code> 层安装下面几个包即可:</p>
<ul>
<li><code>Microsoft.CodeAnalysis.CSharp.Features</code></li>
<li><code>Microsoft.CodeAnalysis.CSharp.Scripting</code></li>
<li><code>Microsoft.CodeAnalysis.VisualBasic.Features</code></li>
<li><code>Microsoft.CodeAnalysis.Workspaces.MSBuild</code></li>
<li><code>Microsoft.VisualStudio.Web.CodeGeneration.Design</code></li>
</ul>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="267-搭建脚手架">2.6.7 搭建脚手架<a href="#267-搭建脚手架" class="hash-link" aria-label="Direct link to 2.6.7 搭建脚手架" title="Direct link to 2.6.7 搭建脚手架"></a></h2>
<p>脚手架可以极大的提高我们搭建新项目的速度,推荐两篇文章给大家学习:</p>
<p><a href="https://www.cnblogs.com/laozhang-is-phi/p/10205495.html" target="_blank" rel="noopener noreferrer">https://www.cnblogs.com/laozhang-is-phi/p/10205495.html</a></p>
<p><a href="https://www.cnblogs.com/catcher1994/p/10061470.html" target="_blank" rel="noopener noreferrer">https://www.cnblogs.com/catcher1994/p/10061470.html</a></p>
<p><strong>推荐直接拷贝 <code>Furion</code> 脚手架文件夹进行修改,可避免很多问题。</strong></p>
<p><a href="https://gitee.com/dotnetchina/Furion/tree/v4/templates" target="_blank" rel="noopener noreferrer">Furion 脚手架源码</a></p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="268-反馈与建议">2.6.8 反馈与建议<a href="#268-反馈与建议" class="hash-link" aria-label="Direct link to 2.6.8 反馈与建议" title="Direct link to 2.6.8 反馈与建议"></a></h2>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>与我们交流</div><div class="admonitionContent_BuS1"><p>给 Furion 提 <a href="https://gitee.com/dotnetchina/Furion/issues/new?issue" target="_blank" rel="noopener noreferrer">Issue</a></p></div></div>
<hr>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>了解更多</div><div class="admonitionContent_BuS1"><p>想了解更多 <code>模板知识</code> 知识可查阅 <a href="https://docs.microsoft.com/zh-cn/dotnet/core/tools/dotnet-new" target="_blank" rel="noopener noreferrer">dotnet-new 模板</a> 章节。</p></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><a href="http://github.crmeb.net/u/furion" target="_blank" style="display:block;margin-bottom:20px;text-decoration:none;position:relative;border-radius:5px;overflow:hidden;color:#25c2a0" title="CRMEB 专注开源电商系统研发"><img src="/img/crmeb-spec.jpg" style="display:block;pointer-events:none;max-width:100%"><span style="position:absolute;display:block;right:0;bottom:0;z-index:5;font-size:12px;background-color:rgba(0,0,0,0.8);padding:0 5px">特别赞助</span></a><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a class="ass_kwc6" style="margin:0;margin-bottom:10px;height:80px;z-index:999" href="/docs/subscribe"><div class="title_MSGy">开通 VIP 服务尊享一对一技术指导</div><div class="progress_esN_"><div class="number_F0eG">344</div><div class="percent_Dln9"><div class="current_QYTp" style="width:34.4%"></div></div><div class="number_F0eG">1000</div></div></a><a href="https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/template.mdx" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_VsjB"><div class="donate_FEDP" style="margin:0;margin-bottom:10px;border:2px solid #ffb02e;margin-top:-4px" title="您的支持是我们坚持完善下去的动力!"><div style="position:relative;margin-right:9px"><img src="/img/donateme.png" style="height:100%;max-height:100%;display:block;min-width:70px" alt="赞助 Furion"><span style="position:absolute;top:25px;left:0;right:0;font-size:12px;z-index:1;text-align:center;color:white;font-weight:bold;background-color:rgba(0, 0, 0, 0.4)">查看大图</span></div><div style="display:flex;flex:1;flex-direction:column;justify-content:space-between;padding:5px 0 5px 0"><h3 style="font-weight:500;font-size:17px;margin:4px 0 0 0;text-align:left;background:linear-gradient(to right, red, blue);background-clip:text;-webkit-background-clip:text;color:transparent;white-space:nowrap;cursor:pointer">谢谢您对 Furion 的认可!</h3><div style="display:flex;justify-content:space-between;white-space:nowrap;margin-top:10px"><span style="font-size:12px;color:#ccc">微信ibaiqian</span><a href="https://gitee.com/dotnetchina/Furion" style="margin-right:6px" target="_blank"><img src="https://gitee.com/dotnetchina/Furion/badge/star.svg?theme=white" alt="star"></a></div></div></div><span class="theme-last-updated">Last updated<!-- --> on <b><time datetime="2023-11-24T07:35:49.000Z">Nov 24, 2023</time></b> by <b>百小僧</b></span></div></div><a style="display:flex;width:100%;box-sizing:border-box;align-items:center;justify-content:space-between;padding-left:5px" title="⭐️ 开通 VIP 服务仅需 499 元/年,尊享 365 天项目无忧2323 ⭐️" hre
</body>
</html>