0
{
  "dependencies": {
    "Autofac": "4.6.0",
    "Autofac.Extensions.DependencyInjection": "4.1.0",
    "AutoMapper.Extensions.Microsoft.DependencyInjection": "2.0.1",
    "xx.Service.Core": "1.0.0-*",
    "Akka": "1.2.0",
    "Akka.Remote": "1.2.0",
    "System.Net.Http": "4.3.2",
    "DotNetty.Transport": "0.4.5",
    "DotNetty.Handlers": "0.4.5",
    "DotNetty.Codecs": "0.4.5",
    "DotNetty.Buffers": "0.4.5",
    "DotNetty.Common": "0.4.5",
    "Newtonsoft.Json": "10.0.2",
    "System.Diagnostics.DiagnosticSource": "4.3.1",
    "AutoMapper": "6.1.0",
    "Microsoft.EntityFrameworkCore.Relational": "1.1.2",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.2",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.1",
    "Microsoft.AspNetCore.Hosting": "1.1.2",
    "Microsoft.AspNetCore.Http.Abstractions": "1.1.2",
    "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.1.3",
    "xx.Web.Core": "1.0.0-*",
    "Microsoft.Extensions.DependencyInjection": "2.0.0-preview1-final",
    "Microsoft.AspNetCore.Mvc": "1.1.3",
    "Microsoft.AspNetCore.Routing": "1.1.2",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.2",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.2",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.1.2",
    "Microsoft.Extensions.Configuration.Json": "1.1.2",
    "Microsoft.Extensions.Logging": "1.1.2",
    "Microsoft.Extensions.Logging.Console": "1.1.2",
    "Microsoft.Extensions.Logging.Debug": "1.1.2",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.2",
    "Microsoft.EntityFrameworkCore": "1.1.2",
    "Microsoft.Extensions.Logging.Abstractions": "2.0.0-preview1-final",
    "Microsoft.Extensions.DependencyInjection.Abstractions": "2.0.0-preview1-final",
    "Microsoft.Extensions.Configuration": "2.0.0-preview1-final",
    "Microsoft.AspNetCore": "1.1.2"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },
  "frameworks": {
    "net462": {
      "dependencies": {
        "Anadolum.Shared.Messages": {
          "target": "project"
        }
      }
    }
  },
  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true,
    "copyToOutput": {
      "include": [ "appsettings.json", "rawrabbit.json" ]
    }
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config",
      "rawrabbit.json"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
  //,
  //"runtimes": {
  //  "win7-x64": {}
  //}
}

This is the startup code

var host = new WebHostBuilder()
    .UseKestrel()
    .UseContentRoot(Directory.GetCurrentDirectory())
    .UseIISIntegration()
    .UseStartup<Startup>()
    .Build();
host.Run(); 

I can't fix this error below. This is my package.config file.

An unhandled exception of type 'System.MissingMethodException' occurred in xxx.exe.

Additional information: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.

How can I fix it?

Icepickle
  • 12,689
  • 3
  • 34
  • 48
ayse
  • 93
  • 8
  • You seem to have a package which is not compatible with your current setup, and due to that, the invocation of the missing method fails, however you give very little information, like when does this error happen? – Icepickle Jun 16 '17 at 00:38
  • var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() .Build(); host.Run(); – ayse Jun 16 '17 at 01:05
  • Yes,I think like you but I don't know how to fix it. I follow the error message and fix the version on DLL not found errors. How can I check which version is right ? – ayse Jun 16 '17 at 01:08
  • I wonder if this question is still actual. I had this problem and solved it, but don't remember how. Suppose it was connected with Autofac and AspnetCore integration. Did you follow the instructions from Autofac? http://autofac.readthedocs.io/en/latest/integration/aspnetcore.html – Kantora Jun 28 '17 at 06:22

0 Answers0