I've to admit I'm a little bit confused with how ASP.NET vNext handles dependencies. The thing is that I'd like to use Microsoft Sync Framework with an API I'm implementing in ASP.NET 5. Back in the past I used to install 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 and added it as a dependency in my ASP.NET vNext project:
"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": { }
}
And when VS tries to restore the package, it gets this error:
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)
And as a result I don't have the package included.
Any ideas on how to tackle this?