0

概述

我正在查看AspNet.Security.OAuth.ProvidersGithub 上的包(单击此处)。我们想要使用的 IDaaS 之一未列出。我正在尝试为缺少的 IDaaS 开发 OAuth 提供程序,但在尝试dotnet build在新 OAuth 提供程序的文件夹中运行时遇到以下错误:

Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
/Users/user1/Documents/dev/AspNet.Security.OAuth.Providers/src/AspNet.Security.OAuth.NewProvider/AspNet.Security.OAuth.NewProvider.csproj : error NU1101: Unable to find package AspNet.Security.OAuth.NewProvider. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet-tools, NuGet
  Failed to restore /Users/user1/Documents/dev/AspNet.Security.OAuth.Providers/src/AspNet.Security.OAuth.NewProvider/AspNet.Security.OAuth.NewProvider.csproj (in 1.25 sec).

Build FAILED.

/Users/user1/Documents/dev/AspNet.Security.OAuth.Providers/src/AspNet.Security.OAuth.NewProvider/AspNet.Security.OAuth.NewProvider.csproj : error NU1101: Unable to find package AspNet.Security.OAuth.NewProvider. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet-tools, NuGet
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.29

重现步骤

  1. 克隆AspNet.Security.OAuth.Providers到本地计算机。
  2. 复制/src/AspNet.Security.OAuth.GitHub文件夹,并将其重命名为“NewProvider”。
  3. 将所有文件、类和命名空间从 重命名GithubNewProvider.
  4. 继续运行dotnet build/src/AspNet.Security.OAuth.NewProvider
  5. 抛出错误。

问题

  • 我究竟做错了什么?
  • AspNet.Security.OAuth.NewProvider不在 Nuget 或任何包管理器中。这是我们正在尝试开发的全新库。有没有办法告诉 VS Code 不要停止在 Nuget 中寻找它?
4

1 回答 1

-1

在 Github 上发布了一个问题,并收到了解决我的问题的以下答案:

https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/issues/641

于 2022-01-07T17:12:39.787 回答