Asp.Net Core"无法找到Dependency jobsledger> = 1.0.0"在" dnu恢复"

时间:2016-04-27 12:42:19

标签: asp.net-mvc nuget asp.net-core nuget-package nuget-package-restore

我试图在OnModelCreating(构建器)中更改实体表的名称,现在当我使用" dnu restore"我收到以下错误:

        Unable to locate Dependency 
    jobsledger
    >= 1.0.0

我做了一些研究,我认为这与我的nuget.config有关..但是我没有个人背景,所以我希望有人可能有一个简单的答案,为什么现在为我失败了两次..输入" dnu恢复":

后,这是完整列表
  PM> dnu restore
  Microsoft .NET Development Utility Clr-x86-1.0.0-rc2-20221

  CACHE https://www.nuget.org/api/v2/
  CACHE https://myget.org/f/dotnet-core/api/v3/index.json
  Restoring packages for C:\Users\simon\REPOS\JobsLedger\src\jobsledger\project.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='jobsledger'
  GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/jobsledger/index.json
  NotFound https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/jobsledger/index.json 981ms
  dnu : Unable to locate Dependency jobsledger >= 1.0.0
  At line:1 char:1
  + dnu restore
  + ~~~~~~~~~~~
  + CategoryInfo          : NotSpecified: (Unable to locat...ledger >= 1.0.0:String) [], RemoteException
  + FullyQualifiedErrorId : NativeCommandError

  Writing lock file C:\Users\simon\REPOS\JobsLedger\src\jobsledger\project.lock.json
  Restore complete, 1113ms elapsed

  Errors in C:\Users\simon\REPOS\JobsLedger\src\jobsledger\project.json


  Unable to locate Dependency
  jobsledger
  >= 1.0.0



  NuGet Config files used:
  C:\Users\simon\AppData\Roaming\NuGet\nuget.config

  Feeds used:
  https://www.nuget.org/api/v2/
  https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/
  PM>

在添加" key =" DotNet = Core ..."之后,这是我的nuget.config文件。行:

      <?xml version="1.0" encoding="utf-8"?>
  <configuration>
     <packageRestore>
      <add key="enabled" value="True" />
      <add key="automatic" value="True" />
    </packageRestore>
    <bindingRedirects>
      <add key="skip" value="False" />
    </bindingRedirects>
    <packageSources>
      <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
      <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
      <add key="DotNet-Core" value="https://myget.org/f/dotnet-core/api/v3/index.json" />
    </packageSources>
    <disabledPackageSources>
      <add key="MyGet" value="true" />
    </disabledPackageSources>
    <activePackageSource>
      <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    </activePackageSource>
  </configuration>

如何让dnu再次恢复,更重要的是为什么它首先会向南移动?当我向这个方法添加一些东西时似乎总会发生:

protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

    }

0 个答案:

没有答案