Ich habe eine .NET-Core-MVC-Anwendung, mit den folgenden project.json
Abhängigkeiten und Werkzeuge:ASP.NET-Core unter Windows 10: Kann nicht System.Runtime.Serialization.Xml finden 4.0.0.0
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.1.0",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.1",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"System.Runtime.Serialization.Json" : "4.0.0",
"System.Runtime.Serialization.Xml" : "4.0.0",
"SpinWorks.JobManager.SpecificModels": {
"version": "1.0.0",
"target": "project"
}
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
},
Beachten Sie, dass ich addierten die folgenden absichtlich:
"System.Runtime.Serialization.Json" : "4.0.0",
"System.Runtime.Serialization.Xml" : "4.0.0",
Dies ist der Fehler, den ich während der Laufzeit erhalten:
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Could not load file or assembly 'System.Runtime.Serialization.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Haben Sie eine 'dotnet restore' ausgeführt? – DavidG
Haben Sie wiederhergestellt? –
@DavidG, nur eine Sekunde schnell waren Sie. : D –