Asp.net 无法将Microsoft.Owin.Security.Google从2.0.0版更新到4.0.0版

Asp.net 无法将Microsoft.Owin.Security.Google从2.0.0版更新到4.0.0版,asp.net,asp.net-web-api,oauth-2.0,google-oauth,Asp.net,Asp.net Web Api,Oauth 2.0,Google Oauth,我正试图通过以下链接在我的WebAPI项目中实现外部身份验证 上面的代码找不到GoogleOAuth2AuthenticationOptions类。。搜索问题时,我的microsoft.owin.security.google软件包似乎未更新。当我尝试使用NuGet更新它时,它无法下载包,显示以下错误: 如何更新包并使google身份验证工作您需要将您的项目目标框架升级到至少.Net Framework 4.5.1 app.UseGoogleAuthentication(new GoogleO

我正试图通过以下链接在我的WebAPI项目中实现外部身份验证

上面的代码找不到GoogleOAuth2AuthenticationOptions类。。搜索问题时,我的microsoft.owin.security.google软件包似乎未更新。当我尝试使用NuGet更新它时,它无法下载包,显示以下错误:


如何更新包并使google身份验证工作

您需要将您的项目目标框架升级到至少
.Net Framework 4.5.1

app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() { 
                ClientId = "",
                ClientSecret=""

});