升级Ocelot 18.0.0 & 支持.net6

pull/14/head
liguoliang 3 years ago
parent ab147e9ed1
commit 75730ec6ff

@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApiGatewayDemo</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Ocelot" Version="18.0.0" />
</ItemGroup>
<ItemGroup>

@ -3,7 +3,7 @@
"ApiGatewayDemo": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5001",
"applicationUrl": "http://0.0.0.0:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

@ -18,7 +18,7 @@
"ProductApi": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://*:5002",
"applicationUrl": "http://0.0.0.0:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

@ -21,7 +21,9 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2
public static IServiceCollection AddNacosAspNet(this IServiceCollection services, IConfiguration configuration, string section = "nacos")
{
services.Configure<NacosAspNetOptions>(configuration.GetSection(section));
services.AddNacosV2Naming(configuration);
services.AddNacosV2Naming(configuration, sectionName: section);
services.AddSingleton<RegSvcBgTask>();
return services;

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Authors>softlgl</Authors>
<Copyright>softlgl</Copyright>
<Owners>softlgl</Owners>
@ -12,10 +12,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nacos-sdk-csharp" Version="1.2.2" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="nacos-sdk-csharp" Version="1.3.1" />
<PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="EasyCaching.InMemory" Version="1.4.1" />
<PackageReference Include="EasyCaching.InMemory" Version="1.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
</ItemGroup>
</Project>

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Loading…
Cancel
Save