10
09/24
.NET8如何在普通类库中引用 Microsoft.AspNetCore
.NET8如何在普通类库中引用 Microsoft.AspNetCore,只需要引入Microsoft.AspNetCore.App即可 <ItemGroup> <FrameworkReference Include="Microsoft.AspNetCore.App" /> </ItemGroup> 完整代码如下: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net8.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> &l...