将 NuGet 包添加到 ASP.NET vNext 项目时出错

Error while adding NuGet package to ASP.NET vNext project

我不得不承认我对 ASP.NET vNext 处理依赖关系的方式有点困惑。问题是我想将 Microsoft Sync Framework 与我在 ASP.NET 中实现的 API 一起使用 5. 过去我曾经安装 the SDK and then just reference appropriate dlls. It seems that it's not the case with vNext as it's all package driven when it comes to dependencies. Thus I've found Microsoft.SyncFramework package on NuGet 并将其添加为我的 ASP.NET vNext 项目中的依赖项:

"dependencies": {
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta1",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta1",
    "Microsoft.AspNet.Mvc": "6.0.0-beta1"
},
"frameworks": {
    "aspnet50": {
        "dependencies": {
            "Microsoft.SyncFramework": "2.1.0.2"
        }
    },
    "aspnetcore50": { }
}

当 VS 尝试恢复包时,出现此错误:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Framework.Runtime.LibraryInformation..ctor(LibraryDescription description)
   at Microsoft.Framework.Runtime.LibraryManager.<>c__DisplayClass2.<GetLibraryInfoThunk>b__7(LibraryDescription library)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Microsoft.Framework.Runtime.LibraryManager.EnsureInitialized()
   at Microsoft.Framework.Runtime.LibraryManager.GetLibraryInformation(String name, String aspect)
   at Microsoft.Framework.Runtime.ProjectExportProviderHelper.GetExportsRecursive(ICache cache, ILibraryManager manager, ILibraryExportProvider libraryExportProvider, ILibraryKey target, Boolean dependenciesOnly)
   at Microsoft.Framework.Runtime.LibraryManager.<>c__DisplayClass0.<GetAllExports>b__1(CacheContext ctx)
   at Microsoft.Framework.Runtime.CacheExtensions.<>c__DisplayClass0`1.<Get>b__1(CacheContext ctx)
   at Microsoft.Framework.Runtime.Cache.CreateEntry(Object k, Func`2 acquire)
   at Microsoft.Framework.Runtime.Cache.<>c__DisplayClass3.<AddEntry>b__4()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.Framework.Runtime.Cache.Get(Object key, Func`2 factory)
   at Microsoft.Framework.Runtime.CacheExtensions.Get[T](ICache cache, Object key, Func`2 factory)
   at Microsoft.Framework.Runtime.LibraryManager.GetAllExports(String name, String aspect)
   at Microsoft.Framework.Runtime.LibraryManager.GetAllExports(String name)
   at Microsoft.Framework.Runtime.ProjectMetadataProvider.GetProjectMetadata(String name)
   at Microsoft.Framework.DesignTimeHost.ApplicationContext.Initialize(String appPath, String configuration, Boolean triggerBuildOutputs)
   at Microsoft.Framework.DesignTimeHost.ApplicationContext.Calculate()
   at Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
   at Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state)

因此我没有随附包裹。

关于如何解决这个问题有什么想法吗?

显然 ASP.NET vNext 放弃了对 NuGet 包中 运行 *.ps1 脚本的支持 http://forums.asp.net/p/2027698/5842272.aspx