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.

1 line
7.9 KiB
JavaScript

1 year ago
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[6792],{2585:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>d,metadata:()=>o,toc:()=>a});var t=s(5893),r=s(1151),c=s(4996);const d={id:"net5-to-net6",title:"2.9 .NET5 \u5347\u7ea7 .NET6",sidebar_label:"2.9 .NET5 \u5347\u7ea7 .NET6",description:"\u4e86\u89e3\u5982\u4f55\u4ece .NET5 \u5347\u7ea7\u5230 .NET6"},i=void 0,o={id:"net5-to-net6",title:"2.9 .NET5 \u5347\u7ea7 .NET6",description:"\u4e86\u89e3\u5982\u4f55\u4ece .NET5 \u5347\u7ea7\u5230 .NET6",source:"@site/docs/net5-to-net6.mdx",sourceDirName:".",slug:"/net5-to-net6",permalink:"/docs/net5-to-net6",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/net5-to-net6.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1700811349,formattedLastUpdatedAt:"Nov 24, 2023",frontMatter:{id:"net5-to-net6",title:"2.9 .NET5 \u5347\u7ea7 .NET6",sidebar_label:"2.9 .NET5 \u5347\u7ea7 .NET6",description:"\u4e86\u89e3\u5982\u4f55\u4ece .NET5 \u5347\u7ea7\u5230 .NET6"},sidebar:"docs",previous:{title:"2.8 \u795e\u5947\u7684 Inject",permalink:"/docs/inject"},next:{title:"2.10 .NET6 \u5347\u7ea7 .NET7",permalink:"/docs/net6-to-net7"}},l={},a=[{value:"2.9.1 \u5347\u7ea7\u6ce8\u610f\u4e8b\u9879",id:"291-\u5347\u7ea7\u6ce8\u610f\u4e8b\u9879",level:2},{value:"2.9.1.1 \u5b89\u88c5 <code>.NET6 SDK</code>",id:"2911-\u5b89\u88c5-net6-sdk",level:3},{value:"2.9.1.2 \u7f16\u8f91 <code>.csproj</code> \u6587\u4ef6",id:"2912-\u7f16\u8f91-csproj-\u6587\u4ef6",level:3},{value:"2.9.1.3 \u5347\u7ea7 <code>NuGet</code> \u5305",id:"2913-\u5347\u7ea7-nuget-\u5305",level:3},{value:"2.9.1.4 \u5220\u9664 <code>Startup.cs</code> \u6587\u4ef6",id:"2914-\u5220\u9664-startupcs-\u6587\u4ef6",level:3},{value:"2.9.1.5 \u7f16\u8f91 <code>Web</code> \u542f\u52a8\u5c42 <code>.csproj</code>",id:"2915-\u7f16\u8f91-web-\u542f\u52a8\u5c42-csproj",level:3},{value:"2.9.1.6 \u66ff\u6362 <code>Program.cs</code> \u5185\u5bb9\u4e3a\uff1a",id:"2916-\u66ff\u6362-programcs-\u5185\u5bb9\u4e3a",level:3},{value:"2.9.1.7 \u91cd\u65b0\u7f16\u8bd1\u6574\u4e2a\u89e3\u51b3\u65b9\u6848",id:"2917-\u91cd\u65b0\u7f16\u8bd1\u6574\u4e2a\u89e3\u51b3\u65b9\u6848",level:3}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"291-\u5347\u7ea7\u6ce8\u610f\u4e8b\u9879",children:"2.9.1 \u5347\u7ea7\u6ce8\u610f\u4e8b\u9879"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["\u76ee\u524d\u4f7f\u7528 ",(0,t.jsx)(n.code,{children:"Furion"})," \u6240\u6709\u7248\u672c\uff080.x-3.x\uff09\u7684\u7528\u6237\u5747\u53ef\u4ee5\u5feb\u901f\u65e0\u7f1d\u5347\u7ea7\u81f3 ",(0,t.jsx)(n.code,{children:"Furion v4.x"})," \u7248\u672c\uff0c\u53ea\u9700\u8981\u505a\u5c11\u91cf\u66f4\u6539\u5373\u53ef\u3002"]})}),"\n",(0,t.jsxs)(n.h3,{id:"2911-\u5b89\u88c5-net6-sdk",children:["2.9.1.1 \u5b89\u88c5 ",(0,t.jsx)(n.code,{children:".NET6 SDK"})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"https://dotnet.microsoft.com/download/dotnet/6.0",children:"https://dotnet.microsoft.com/download/dotnet/6.0"})}),"\n",(0,t.jsxs)(n.h3,{id:"2912-\u7f16\u8f91-csproj-\u6587\u4ef6",children:["2.9.1.2 \u7f16\u8f91 ",(0,t.jsx)(n.code,{children:".csproj"})," \u6587\u4ef6"]}),"\n",(0,t.jsxs)(n.p,{children:["\u7f16\u8f91\u89e3\u51b3\u65b9\u6848\u6240\u6709\u9879\u76ee\u7684 ",(0,t.jsx)(n.code,{children:".csproj"})," \u6587\u4ef6\uff0c\u5e76\u66ff\u6362 ",(0,t.jsx)(n.code,{children:"<TargetFramework>net5.0</TargetFramework>"})," \u4e3a ",(0,t.jsx)(n.code,{children:"<TargetFramework>net6.0</TargetFramework>"}),"\uff0c\u5982\uff1a"]}),"\n",(0,t.jsx)("img",{src:(0,c.Z)("img/sjl1.png")}),"\n",(0,t.jsxs)(n.p,{children:["\u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528 ",(0,t.jsx)(n.code,{children:"Ctrl + F"})," \u5168\u5c40\u66ff\u6362"]}),"\n",(0,t.jsx)("img",{src:(0,c.Z)("img/sjl2.png")}),"\n",(0,t.jsxs)(n.h3,{id:"2913-\u5347\u7ea7-nuget-\u5305",children:["2.9.1.3 \u5347\u7