Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用MVC应用程序使用Gsuite登录_C#_Asp.net Mvc_Google Authentication_Google Workspace - Fatal编程技术网

C# 使用MVC应用程序使用Gsuite登录

C# 使用MVC应用程序使用Gsuite登录,c#,asp.net-mvc,google-authentication,google-workspace,C#,Asp.net Mvc,Google Authentication,Google Workspace,我需要使用MVC应用程序实现Gsuite登录 我使用下面的链接来实现 我复制了与上面链接相同的代码 我已经在我的应用程序中添加了nuget包Google.api.Oauth2.v2-Version 1.32.1.1103(最新版本),但仍然无法在类文件中添加对GoogleOAuth2Client的引用 你能帮我这里出了什么问题吗?什么意思不能在类文件中添加对GoogleOAuth2Client的引用?您不向类文件添加引用,而是使用类型。你有编译错误吗?您是否使用指令添加了正确的;目录仍然存在编

我需要使用MVC应用程序实现Gsuite登录

我使用下面的链接来实现

我复制了与上面链接相同的代码

我已经在我的应用程序中添加了nuget包Google.api.Oauth2.v2-Version 1.32.1.1103(最新版本),但仍然无法在类文件中添加对GoogleOAuth2Client的引用


你能帮我这里出了什么问题吗?

什么意思
不能在类文件中添加对GoogleOAuth2Client的引用?您不向类文件添加引用,而是使用类型。你有编译错误吗?您是否使用
指令添加了正确的
;目录仍然存在编译错误。顺便说一句,您提供的链接是一个问题,而不是一个实现指南。它没有解释如何实现身份验证什么编译错误?人们无法猜测是的,但在链接中,它的书面代码运行良好,他只是想要一些域限制,所以我复制了它