致电
using Microsoft.AspNetCore.Builder;
using Joonasw.AspNetCore.SecurityHeaders;
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseHsts();
}
导致错误:
The call is ambiguous between the following methods or properties: 'Microsoft.AspNetCore.Builder.HstsBuilderExtensions.UseHsts(Microsoft.AspNetCore.Builder.IApplicationBuilder)' and 'Joonasw.AspNetCore.SecurityHeaders.AppBuilderExtensions.UseHsts(Microsoft.AspNetCore.Builder.IApplicationBuilder)'
我正在使用来自两个名称空间的扩展方法,所以我不能停止引用其中一个。
如何继续使用两个命名空间,并精确地告诉编译器我想要哪种扩展方法?