Skip to content

No service for type 'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment' has been registered. #2073

@dvmahida

Description

@dvmahida

When i try to run my application locally i am getting this error :
An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Extensions.DependencyInjection.Abstractions.dll

Additional information: No service for type 'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment' has been registered.

Here is my project.json
{
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"System.IdentityModel.Tokens.Jwt": "5.0.0",
"WindowsAzure.ServiceBus": "3.2.2"
},
"exclude": [
"wwwroot",
"node_modules"
],
"frameworks": {
"dnx451": {
"dependencies": {
"Microsoft.Net.Http": "2.2.22",
"WindowsAzure.Storage": "7.0.0"
}
}
},
"publishExclude": [
".user",
"
.vspscc"
],
"version": "1.0.0-*"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions