title: DOTNET core The call is ambiguous between methods Configuration
body: <p>Getting Error </p>
  
  <blockquote>
    <p>The call is ambiguous between the following methods or properties: 'Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseConfiguration(Microsoft.AspNetCore.Hosting.IWebHostBuilder, Microsoft.Extensions.Configuration.IConfiguration)' and 'Microsoft.AspNetCore.Hosting.HostingAbstractionsWebHostBuilderExtensions.UseConfiguration </p>
  </blockquote>
  
  <p>in line <code>.UseConfiguration(ConfigurationRoot)</code> </p>
  
  <h3>My Method</h3>
  
  <pre><code>var builder = new ConfigurationBuilder()
      .AddJsonFile($"appsettings-{Environment.GetEnvironmentVariable("azure")}.json")
      .AddEnvironmentVariables()
      .AddCommandLine(args);
  
  ConfigurationRoot = builder.Build();
  
  var application = new WebHostBuilder()
    .UseConfiguration(ConfigurationRoot)
    .UseIISIntegration()
    .UseServer("Microsoft.AspNetCore.Server.Kestrel")
    .UseStartup&lt;Startup&gt;()
    .Build();
  application.Run();
  </code></pre>
  
  <h3>Project.json</h3>
  
  <pre><code>{
    "version": "1.0.0-*",
    "description": "Aps.ManageIT.WebAPI",
    "authors": [ "IPPCS" ],
    "commands": {
      "web": "Microsoft.AspNet.Server.Kestrel"
    },
    "buildOptions": {
      "emitEntryPoint": true,
      "preserveCompilationContext": true,
      "copyToOutput": {
        "include": [ "wwwroot" ],
        "includeFiles": [
          "appsettings.json",
          "appsettings-dev.json",
          "web.config",
          "appsettings-aps.json",
          "appsettings-adidasdev.json",
          "appsettings-prod.json"
        ]
      },
      "compile": [
        "wwwroot"
      ]
    },
    "publishOptions": {
      "include": [ "wwwroot" ],
      "includeFiles": [
        "appsettings.json",
        "appsettings-dev.json",
        "web.config",
        "appsettings-aps.json",
        "appsettings-adidasdev.json",
        "appsettings-prod.json"
      ]
    },
    "dependencies": {
      "Aps.ManageIT.Repository.MongoDB": "1.0.0-*",
      "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
      "Microsoft.AspNetCore.Server.Kestrel": "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.DependencyInjection": "1.0.0-rc2-final",
      "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc2-final",
      "Microsoft.Extensions.Logging": "1.0.0-rc2-final",
      "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
      "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
      "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
      "OpenIddict": "1.0.0-alpha2-0288",
      "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc2-final",
      "Microsoft.Extensions.Options": "1.0.0-rc2-final",
      "mongocsharpdriver": "2.2.0",
      "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
      "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
      "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0-rc2-final",
      "Microsoft.AspNetCore.Identity": "1.0.0-rc2-final",
      "HtmlAgilityPack": "1.4.9.4",
      "Microsoft.AspNet.WebApi.Cors": "5.2.3",
      "Microsoft.Extensions.Configuration.Binder": "1.0.0-rc2-final",
      "Aps.JobIT.Log.Repository.MongoDB": "1.0.0-*",
      "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-rc2-final",
      "WindowsAzure.Storage": "8.0.1"
    },
    "frameworks": {
      "net452": {}
    },
    "tools": {
      "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
    },
    "scripts": {
      "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
    }
  }
  </code></pre>