mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 04:31:22 +08:00
doc: update docs/dotnet-cli.md #945 e0b540d174
This commit is contained in:
@ -40,7 +40,7 @@
|
|||||||
<p>本备忘单总结了 <a href="https://learn.microsoft.com/zh-cn/dotnet/core/tools/">.NET</a> 命令行接口 (CLI) 工具,以供快速参考</p>
|
<p>本备忘单总结了 <a href="https://learn.microsoft.com/zh-cn/dotnet/core/tools/">.NET</a> 命令行接口 (CLI) 工具,以供快速参考</p>
|
||||||
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
|
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
|
||||||
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
|
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
|
||||||
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#net-cli-备忘清单-1">.NET CLI 备忘清单</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#介绍">介绍</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#基本命令">基本命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#项目修改命令">项目修改命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#工作负荷管理命令">工作负荷管理命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nuget-命令">NuGet 命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#高级命令">高级命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#工具管理命令">工具管理命令</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 style="display: none;" id="net-cli-备忘清单-1"><a aria-hidden="true" tabindex="-1" href="#net-cli-备忘清单-1"><span class="icon icon-link"></span></a>.NET CLI 备忘清单</h2><div class="wrap-body">
|
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#net-cli-备忘清单-1">.NET CLI 备忘清单</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#介绍">介绍</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#基本命令">基本命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#项目修改命令">项目修改命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#工作负荷管理命令">工作负荷管理命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nuget-命令">NuGet 命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#高级命令">高级命令</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#工具管理命令">工具管理命令</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另请参阅">另请参阅</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 style="display: none;" id="net-cli-备忘清单-1"><a aria-hidden="true" tabindex="-1" href="#net-cli-备忘清单-1"><span class="icon icon-link"></span></a>.NET CLI 备忘清单</h2><div class="wrap-body">
|
||||||
<!--rehype:style=display: none;-->
|
<!--rehype:style=display: none;-->
|
||||||
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="介绍"><a aria-hidden="true" tabindex="-1" href="#介绍"><span class="icon icon-link"></span></a>介绍</h3><div class="wrap-body">
|
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="介绍"><a aria-hidden="true" tabindex="-1" href="#介绍"><span class="icon icon-link"></span></a>介绍</h3><div class="wrap-body">
|
||||||
<p><code>.NET CLI</code> 命令由 <strong>驱动程序(<code>dotnet</code>)</strong>、<strong>命令</strong>、<strong>参数</strong> 和 <strong>选项</strong> 组成。典型流程如下:</p>
|
<p><code>.NET CLI</code> 命令由 <strong>驱动程序(<code>dotnet</code>)</strong>、<strong>命令</strong>、<strong>参数</strong> 和 <strong>选项</strong> 组成。典型流程如下:</p>
|
||||||
@ -419,7 +419,12 @@
|
|||||||
|
|
||||||
<table class="left-align"><thead><tr><th>命令</th><th>说明</th><th>示例</th></tr></thead><tbody><tr><td><code>tool install</code></td><td>安装 .NET 工具(本地或全局)</td><td><code>dotnet tool install -g dotnet-ef</code></td></tr><tr><td><code>tool list</code></td><td>列出已安装的工具</td><td><code>dotnet tool list -g</code></td></tr><tr><td><code>tool update</code></td><td>更新指定工具</td><td><code>dotnet tool update -g dotnet-ef</code></td></tr><tr><td><code>tool restore</code></td><td>恢复项目中定义的工具(基于 manifest)</td><td><code>dotnet tool restore</code></td></tr><tr><td><code>tool run</code></td><td>运行本地安装的工具</td><td><code>dotnet tool run my-tool</code></td></tr><tr><td><code>tool uninstall</code></td><td>卸载已安装的工具</td><td><code>dotnet tool uninstall -g dotnet-ef</code></td></tr><tr><td><code>tool search</code></td><td>搜索 NuGet 上可用的工具</td><td><code>dotnet tool search dotnet-ef</code></td></tr></tbody></table>
|
<table class="left-align"><thead><tr><th>命令</th><th>说明</th><th>示例</th></tr></thead><tbody><tr><td><code>tool install</code></td><td>安装 .NET 工具(本地或全局)</td><td><code>dotnet tool install -g dotnet-ef</code></td></tr><tr><td><code>tool list</code></td><td>列出已安装的工具</td><td><code>dotnet tool list -g</code></td></tr><tr><td><code>tool update</code></td><td>更新指定工具</td><td><code>dotnet tool update -g dotnet-ef</code></td></tr><tr><td><code>tool restore</code></td><td>恢复项目中定义的工具(基于 manifest)</td><td><code>dotnet tool restore</code></td></tr><tr><td><code>tool run</code></td><td>运行本地安装的工具</td><td><code>dotnet tool run my-tool</code></td></tr><tr><td><code>tool uninstall</code></td><td>卸载已安装的工具</td><td><code>dotnet tool uninstall -g dotnet-ef</code></td></tr><tr><td><code>tool search</code></td><td>搜索 NuGet 上可用的工具</td><td><code>dotnet tool search dotnet-ef</code></td></tr></tbody></table>
|
||||||
<!--rehype:className=left-align-->
|
<!--rehype:className=left-align-->
|
||||||
</div></div></div></div></div></div><script src="https://giscus.app/client.js" data-repo="jaywcjlove/reference" data-repo-id="R_kgDOID2-Mw" data-category="Q&A" data-category-id="DIC_kwDOID2-M84CS5wo" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="dark" data-lang="zh-CN" crossorigin="anonymous" async></script><div class="giscus"></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>.</footer></footer><script src="../data.js?v=1.8.3" defer></script><script src="../js/fuse.min.js?v=1.8.3" defer></script><script src="../js/main.js?v=1.8.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
</div></div></div></div></div><div class="wrap h2body-not-exist"><div class="wrap-header h2wrap"><h2 id="另请参阅"><a aria-hidden="true" tabindex="-1" href="#另请参阅"><span class="icon icon-link"></span></a>另请参阅</h2><div class="wrap-body">
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.com/dotnet/sdk/">dotnet/sdk GitHub 存储库</a> <em>(github.com/dotnet)</em></li>
|
||||||
|
<li><a href="https://learn.microsoft.com/zh-cn/dotnet/core/install/windows">.NET 安装指南</a> <em>(learn.microsoft.com)</em></li>
|
||||||
|
</ul>
|
||||||
|
</div></div><div class="h2wrap-body"></div></div></div><script src="https://giscus.app/client.js" data-repo="jaywcjlove/reference" data-repo-id="R_kgDOID2-Mw" data-category="Q&A" data-category-id="DIC_kwDOID2-M84CS5wo" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="dark" data-lang="zh-CN" crossorigin="anonymous" async></script><div class="giscus"></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>.</footer></footer><script src="../data.js?v=1.8.3" defer></script><script src="../js/fuse.min.js?v=1.8.3" defer></script><script src="../js/main.js?v=1.8.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
||||||
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
||||||
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1691,7 +1691,7 @@
|
|||||||
<li><a href="https://marketplace.visualstudio.com/items?itemName=jackiotyu.quick-reference">Quick Reference for VSCode</a> 由 <a href="https://github.com/jackiotyu/vscode-quick-reference">jackiotyu</a> 提供</li>
|
<li><a href="https://marketplace.visualstudio.com/items?itemName=jackiotyu.quick-reference">Quick Reference for VSCode</a> 由 <a href="https://github.com/jackiotyu/vscode-quick-reference">jackiotyu</a> 提供</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2025/05/27 14:09:56</footer></footer><script src="data.js?v=1.8.3" defer></script><script src="js/fuse.min.js?v=1.8.3" defer></script><script src="js/main.js?v=1.8.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2025/05/27 14:12:42</footer></footer><script src="data.js?v=1.8.3" defer></script><script src="js/fuse.min.js?v=1.8.3" defer></script><script src="js/main.js?v=1.8.3" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
||||||
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
||||||
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user