2016-02-20 7 views
7

इसलिए मैंने अपने प्रोजेक्ट में बदलाव किया। जेसन जिसने पुन: बहाल किया जो अनजान निर्भरताओं के समूह के साथ आ रहा है। आप कैसे पता लगा रहे हैं कि यहां क्या हो रहा है? यह निश्चित रूप से काम कर रहा था क्योंकि मैंने इस प्रोजेक्ट.जेसन फ़ाइल के खिलाफ काफी कुछ कोड लिखा था।एस्पनेट कोर की निर्भरता की समस्या निवारण कैसे करें?

"dependencies": { 
    "EntityFramework.Commands": "7.0.0-*", 
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-*", 
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-*", 
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-*", 
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", 
    "Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc2-*", 
    "Microsoft.AspNet.Mvc": "6.0.0-*", 
    "Microsoft.AspNet.Hosting": "1.0.0-*", 
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", 
    "Microsoft.AspNet.StaticFiles": "1.0.0-*", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0-*", 
    "AspNet.Security.OAuth.Validation": "1.0.0-*", 
    "OpenIddict": "1.0.0-*", 
    "System.IdentityModel.Tokens.Jwt": "5.0.0-rc2-301150021", 
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-15958", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-15958", 
    "EntityFramework.Sqlite": "7.0.0-rc2-*", 
    "EntityFramework.Sqlite.Design": "7.0.0-rc1-final", 
    "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*" 
    } 



NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json 514ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.identity.entityframeworkcore/index.json 498ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.hosting.abstractions/index.json 1743ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.authentication/index.json 1745ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.fileproviders.embedded/index.json 1791ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.fileproviders.composite/index.json 1859ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.identity/index.json 1892ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.cors/index.json 1901ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc/index.json 1875ms 
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.hosting/index.json 1887ms 

NotFound https://api.nuget.org/v3-flatcontainer/openiddict/index.json 1720ms 
+0

में डॉटनेट पर चल रहे एएसपी.Net कोर अनुप्रयोगों के कुछ उदाहरण पा सकते हैं यदि आपको .NET CLI/ASP.NET कोर माइग्रेशन के साथ मदद की ज़रूरत है, तो https://jabbr.net पर हमसे जुड़ने में संकोच नहीं करें/#/कमरे/AspNetCore। – Pinpoint

उत्तर

8

OpenIddict और सभी aspnet-contrib परियोजनाओं have been updated to use .NET CLI and the new ASP.NET Core 1.0 packages, इसलिए यदि आप अपनी परियोजना हाल ही में बहाल, आप की संभावना नवीनतम का उपयोग कर रहे हर रात को बनाता है, कि नए ASP.NET और aspnet-योगदान संकुल की आवश्यकता है।

माइग्रेट करने के लिए, install the .NET Core tooling

आपको एएसपी.NET कोर आरसी 2 पैकेज का उपयोग करने के लिए अपने संदर्भों को अपडेट करने की भी आवश्यकता होगी। यहाँ an updated project.json का एक उदाहरण है:

"dependencies": { 
    "AspNet.Security.OAuth.GitHub": "1.0.0-alpha4-final", 
    "AspNet.Security.OAuth.Introspection": "1.0.0-alpha1-final", 
    "AspNet.Security.OAuth.Validation": "1.0.0-alpha1-final", 
    "Microsoft.AspNetCore.Authentication.Google": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Authentication.Twitter": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", 
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", 
    "OpenIddict": "1.0.0-*" 
}, 

"frameworks": { 
    "net451": { 
    "dependencies": { 
     "Microsoft.NETCore.Platforms": "1.0.1-rc2-24027" 
    } 
    }, 

    "netcoreapp1.0": { 
    "dependencies": { 
     "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-3002702" } 
    }, 

    "imports": [ 
     "dnxcore50", 
     "portable-net451+win8" 
    ] 
    } 
} 

मत भूलना भी usings और to use the new WebHostBuilder को बदलने के लिए:

public static class Program { 
    public static void Main(string[] args) { 
     var configuration = new ConfigurationBuilder() 
      .AddEnvironmentVariables() 
      .AddCommandLine(args) 
      .Build(); 

     var host = new WebHostBuilder() 
      .ConfigureLogging(options => options.AddConsole()) 
      .ConfigureLogging(options => options.AddDebug()) 
      .UseConfiguration(configuration) 
      .UseIISIntegration() 
      .UseKestrel() 
      .UseStartup<Startup>() 
      .Build(); 

     host.Run(); 
    } 
} 

गुड लक।

+0

हे, प्री-रिलीज सॉफ़्टवेयर का उपयोग करने के लिए भुगतान करने की कीमत है। यह मदद करेगा यदि आपने एक या दो संदेश साझा किए हैं;) – Pinpoint

+1

क्या आप 'dotnet' कमांड (यानी डीएनएक्स का उपयोग नहीं कर रहे हैं) के माध्यम से चल रहे एस्पनेट कोर ऐप को प्राप्त करने में सक्षम हैं - मैं अब एक दिन की कोशिश कर रहा हूं:/ – wal

+0

अपडेट किया गया अंतिम एएसपी.नेट कोर आरसी 2 पैकेज का उपयोग करें। – Pinpoint

4

पहला और सबसे महत्वपूर्ण - पैकेज संस्करणों को मिश्रण न करें। सभी आरसी 1 या सभी आरसी 2 आदि का प्रयोग करें। साथ ही "पुराने" (एएसपीनेट - आरसी 1 या पुराने) पैकेज को नए (एएसपीनेट कॉर - आरसी 2 - अभी तक जारी नहीं किया गया) पैकेजों को मिलाएं। यदि आप डीएनएक्स से डॉटनेट पर आरसी 2 स्विच का उपयोग करने का निर्णय लेते हैं। जैसा कि अभी के लिए @ पिनपॉइंट के उत्तर द्वारा इंगित किया गया है, आपको एस्पनेटसीडिव फ़ीड का उपयोग करने की आवश्यकता है। आप this repo

+0

कृपया डाउनवॉट्स के कारण पोस्ट करें। – Pawel

+0

यह सुनिश्चित नहीं है कि आपका उत्तर किसने घटाया लेकिन उत्कृष्ट सलाह देने के लिए +1: पुराने और नए पैकेजों को कभी भी मिश्रण न करें। – Pinpoint

संबंधित मुद्दे