我有一个使用 Steeltoe 3.1.2 从 Steeltoe Initialzr 生成的应用程序。
出于某种原因,编译时我得到:
dotnet/Extract/Startup.cs(53,27):错误 CS1501:方法“MapAllActuators”没有重载需要 0 个参数 [dotnet/Extract/Extract.csproj]
这是我的配置方法:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Extract"));
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapAllActuators();
});
}
和项目定义:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<SteeltoeVersion>3.1.2</SteeltoeVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.1.0" />
<PackageReference Include="Steeltoe.Extensions.Logging.DynamicLogger" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.EndpointCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.TracingCore" Version="$(SteeltoeVersion)" />
</ItemGroup>
</Project>
知道根本原因可能是什么吗?