我正在尝试使用 asp.net 5 。我从 Visual Studio 2015 附带的模板创建了一个 asp.net5 mvc 应用程序。但是 dnu restore 不适用于 src 文件夹。
Nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
<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/" />
</packageSources>
<disabledPackageSources>
<add key="nuget.org" value="true" />
<add key="nuget.org" value="true" />
</disabledPackageSources>
</configuration>
这是我所做的
C:\Users\sam\Documents\Visual Studio 2015\Projects\WebApplication\src\WebApplication> dnvm list
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
1.0.0-beta5 clr x64 C:\Users\sam\.dnx\runtimes
1.0.0-beta5 clr x86 C:\Users\sam\.dnx\runtimes
1.0.0-beta5 coreclr x64 C:\Users\sam\.dnx\runtimes
1.0.0-beta5 coreclr x86 C:\Users\sam\.dnx\runtimes
1.0.0-beta6 clr x86 C:\Users\sam\.dnx\runtimes
1.0.0-beta6 coreclr x64 C:\Users\sam\.dnx\runtimes
* 1.0.0-beta7 clr x86 C:\Users\sam\.dnx\runtimes default
1.0.0-beta8-15530 clr x86 C:\Users\sam\.dnx\runtimes
1.0.0-beta8-15548 clr x86 C:\Users\sam\.dnx\runtimes
1.0.0-beta8-15548 coreclr x86 C:\Users\sam\.dnx\runtimes
C:\Users\sam\Documents\Visual Studio 2015\Projects\WebApplication\src\WebApplication> dnu restore
Microsoft .NET Development Utility CLR-x86-1.0.0-beta7-15532
Restoring packages for C:\Users\sam\Documents\Visual Studio 2015\Projects\WebApplication\src\WebApplication\project.json
Unable to locate EntityFramework.Commands >= 7.0.0-beta7
Unable to locate Microsoft.Framework.Configuration.UserSecrets >= 1.0.0-beta7
Unable to locate Microsoft.VisualStudio.Web.BrowserLink.Loader >= 14.0.0-beta7
Writing lock file C:\Users\sam\Documents\Visual Studio 2015\Projects\WebApplication\src\WebApplication\project.lock.json
Restore complete, 1698ms elapsed
Errors in C:\Users\sam\Documents\Visual Studio 2015\Projects\WebApplication\src\WebApplication\project.json
Unable to locate EntityFramework.Commands >= 7.0.0-beta7
Unable to locate Microsoft.Framework.Configuration.UserSecrets >= 1.0.0-beta7
Unable to locate Microsoft.VisualStudio.Web.BrowserLink.Loader >= 14.0.0-beta7