c# - WebHostBuilder.Build() MissingMethodException in .NET Core migrated solution -
i'm migrating solution built .net core sdk 1.0.0-preview2-1-003177 because want use in visual studio 2017. use dotnet migrate command .net core sdk 1.0.1, goes well, compiles. when run web part iis express classic program.cs containing
var host = new webhostbuilder() .usekestrel() .usecontentroot(directory.getcurrentdirectory()) .useiisintegration() .usestartup<startup>() .build(); host.run();
crashes @ build() exception
system.missingmethodexception: 'method not found: 'system.iserviceprovider microsoft.extensions.dependencyinjection.servicecollectioncontainerbuilderextensions.buildserviceprovider(microsoft.extensions.dependencyinjection.iservicecollection)'.'
i can't find reason @ all.
it looks of dependencies, not updated right version. can old version or new version. can create new project ( dotnet new ) , validate packages version on csproj file. 99% of error cause version mismatch.
Comments
Post a Comment