Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
Hello guys,

I am recently set up Visual Studio 2017, but When i try to start ASP.NET MVC CORE Project that runtime error appears:

System.MissingMethodException occurred
HResult=0x80131513
Message=Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
Source=<Cannot evaluate the exception source>
StackTrace:
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at WebApplication4.Program.Main(String[] args) in C:\Users\qqq\documents\visual studio 2017\Projects\WebApplication4\WebApplication4\Program.cs:line 14


and when i try to run another ASP.NET MVC CORE Project this error message appears:

Unable to start process C:\Program Files\dotnet\dotnet.exe. The web server request failed with status code 500, Internal Server Error. The full response has been written to C:\Users\qqq\AppData\Local\Temp\HttpFailure_04-02-08.html.
Are these errors because of IIS Error or something in configuration ?

that is my project.csproj:

HTML
<pre><Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>

  <PropertyGroup>
    <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
  </ItemGroup>

</Project>


What I have tried:

I searched but cannot find any...
Posted
Updated 15-May-17 4:16am
v3
Comments
[no name] 13-May-17 9:38am    
You would have to look at your code and the error log produced to figure it out.

1 solution

This error usually happens because of incompatible versions of packages.
Like this block:

2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0-preview1-final" />


Try to reduce the versions to 1.1.*
And it will fix your problem..

Incompatible consistency because of some packages are either too high or too low compared to other ones.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900