'IServiceCollection' does not contain a definition for 'AddSession'
I am getting an error while adding 'AddSession' in ASP.Net Core 1.1 using VS2017.
'IServiceCollection' does not contain a definition for 'AddSession'
and no extension method 'AddSession' accepting a first argument of
type 'IServiceCollection' could be found (are you missing a using
directive or an assembly reference?)
.csproj
<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.Session" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<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>
Error :
session asp.net-core asp.net-core-1.0 asp.net-core-1.1 visual-studio-2017
add a comment |
I am getting an error while adding 'AddSession' in ASP.Net Core 1.1 using VS2017.
'IServiceCollection' does not contain a definition for 'AddSession'
and no extension method 'AddSession' accepting a first argument of
type 'IServiceCollection' could be found (are you missing a using
directive or an assembly reference?)
.csproj
<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.Session" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<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>
Error :
session asp.net-core asp.net-core-1.0 asp.net-core-1.1 visual-studio-2017
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39
add a comment |
I am getting an error while adding 'AddSession' in ASP.Net Core 1.1 using VS2017.
'IServiceCollection' does not contain a definition for 'AddSession'
and no extension method 'AddSession' accepting a first argument of
type 'IServiceCollection' could be found (are you missing a using
directive or an assembly reference?)
.csproj
<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.Session" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<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>
Error :
session asp.net-core asp.net-core-1.0 asp.net-core-1.1 visual-studio-2017
I am getting an error while adding 'AddSession' in ASP.Net Core 1.1 using VS2017.
'IServiceCollection' does not contain a definition for 'AddSession'
and no extension method 'AddSession' accepting a first argument of
type 'IServiceCollection' could be found (are you missing a using
directive or an assembly reference?)
.csproj
<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.Session" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<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>
Error :
session asp.net-core asp.net-core-1.0 asp.net-core-1.1 visual-studio-2017
session asp.net-core asp.net-core-1.0 asp.net-core-1.1 visual-studio-2017
edited Nov 29 at 12:21
asked Jun 7 '17 at 10:03
RajeeshMenoth
74011024
74011024
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39
add a comment |
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39
add a comment |
7 Answers
7
active
oldest
votes
You need to include following Nuget package
AutoMapper.Extensions.Microsoft.Dependencyinjection
add a comment |
I know this is a bit late, but did you try to install the Microsoft.AspNetCore.Session package from nuget?
https://www.nuget.org/packages/Microsoft.AspNetCore.Session/
In Visual Studio:
Install-Package Microsoft.AspNetCore.Session -Version 1.1.2(in my case)
It worked for me!
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
add a comment |
The following way I fixed the Issue.
- Clean and Rebuild the solution.
- Restart Visual Studio 2017.
Thanks @HenkMollema
add a comment |
The versions of the dependencies seem to be out of sync. Use Nuget to update all your packages to be the same version and that should solve the issue. This applies to most if not all Microsoft.* packages.
Also you need the following using statements:
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
add a comment |
Make sure you have
<PackageReference Include="Microsoft.AspNetCore.Session" Vesion="1.1.1" />
(or more up-to-date version) within your .csproj file
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
add a comment |
In my case AutoMapper.Extensions.Microsoft.DependencyInjection (v1 was installed). Uninstalled and installed AutoMapper.Extensions.Microsoft.DependencyInjection v5.0.1
add a comment |
Adding the nuget package for Scrutor fixed it for me
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44409554%2fiservicecollection-does-not-contain-a-definition-for-addsession%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to include following Nuget package
AutoMapper.Extensions.Microsoft.Dependencyinjection
add a comment |
You need to include following Nuget package
AutoMapper.Extensions.Microsoft.Dependencyinjection
add a comment |
You need to include following Nuget package
AutoMapper.Extensions.Microsoft.Dependencyinjection
You need to include following Nuget package
AutoMapper.Extensions.Microsoft.Dependencyinjection
answered May 17 at 16:33
Neeraj Kumar
1,85811629
1,85811629
add a comment |
add a comment |
I know this is a bit late, but did you try to install the Microsoft.AspNetCore.Session package from nuget?
https://www.nuget.org/packages/Microsoft.AspNetCore.Session/
In Visual Studio:
Install-Package Microsoft.AspNetCore.Session -Version 1.1.2(in my case)
It worked for me!
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
add a comment |
I know this is a bit late, but did you try to install the Microsoft.AspNetCore.Session package from nuget?
https://www.nuget.org/packages/Microsoft.AspNetCore.Session/
In Visual Studio:
Install-Package Microsoft.AspNetCore.Session -Version 1.1.2(in my case)
It worked for me!
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
add a comment |
I know this is a bit late, but did you try to install the Microsoft.AspNetCore.Session package from nuget?
https://www.nuget.org/packages/Microsoft.AspNetCore.Session/
In Visual Studio:
Install-Package Microsoft.AspNetCore.Session -Version 1.1.2(in my case)
It worked for me!
I know this is a bit late, but did you try to install the Microsoft.AspNetCore.Session package from nuget?
https://www.nuget.org/packages/Microsoft.AspNetCore.Session/
In Visual Studio:
Install-Package Microsoft.AspNetCore.Session -Version 1.1.2(in my case)
It worked for me!
answered Nov 6 '17 at 9:34
Lewis86
392514
392514
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
add a comment |
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
The package is already installed in the project and that you can see in my given .csproj code. Any how everything working fine and this is not an answer for me.
– RajeeshMenoth
Dec 14 '17 at 7:27
1
1
thanks. it works
– Fityan Aula
Feb 17 at 2:21
thanks. it works
– Fityan Aula
Feb 17 at 2:21
1
1
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
This worked for me as well.
– Sibeesh Venu
Apr 4 at 16:15
1
1
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
worked for me. f'n microsoft
– JSON
Nov 2 at 15:45
add a comment |
The following way I fixed the Issue.
- Clean and Rebuild the solution.
- Restart Visual Studio 2017.
Thanks @HenkMollema
add a comment |
The following way I fixed the Issue.
- Clean and Rebuild the solution.
- Restart Visual Studio 2017.
Thanks @HenkMollema
add a comment |
The following way I fixed the Issue.
- Clean and Rebuild the solution.
- Restart Visual Studio 2017.
Thanks @HenkMollema
The following way I fixed the Issue.
- Clean and Rebuild the solution.
- Restart Visual Studio 2017.
Thanks @HenkMollema
answered Jun 10 '17 at 8:29
RajeeshMenoth
74011024
74011024
add a comment |
add a comment |
The versions of the dependencies seem to be out of sync. Use Nuget to update all your packages to be the same version and that should solve the issue. This applies to most if not all Microsoft.* packages.
Also you need the following using statements:
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
add a comment |
The versions of the dependencies seem to be out of sync. Use Nuget to update all your packages to be the same version and that should solve the issue. This applies to most if not all Microsoft.* packages.
Also you need the following using statements:
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
add a comment |
The versions of the dependencies seem to be out of sync. Use Nuget to update all your packages to be the same version and that should solve the issue. This applies to most if not all Microsoft.* packages.
Also you need the following using statements:
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
The versions of the dependencies seem to be out of sync. Use Nuget to update all your packages to be the same version and that should solve the issue. This applies to most if not all Microsoft.* packages.
Also you need the following using statements:
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
edited Jun 7 '17 at 11:02
answered Jun 7 '17 at 10:24
Stephen Wilson
1,0651326
1,0651326
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
add a comment |
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
Which version we can prefer for all dependencies ?
– RajeeshMenoth
Jun 7 '17 at 10:29
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
There is a list of reccomended versions here: nuget.org/packages/Microsoft.AspNetCore
– Stephen Wilson
Jun 7 '17 at 10:32
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
I changed to 1.1.2 but no use.
– RajeeshMenoth
Jun 7 '17 at 10:36
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
It's downloaded and the versions are now 1.1.2. I also done 'Clean' and 'Rebuild' but still I am facing the same Issue.
– RajeeshMenoth
Jun 7 '17 at 10:54
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
Yes, Three more using statements in my class using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging;
– RajeeshMenoth
Jun 7 '17 at 11:06
add a comment |
Make sure you have
<PackageReference Include="Microsoft.AspNetCore.Session" Vesion="1.1.1" />
(or more up-to-date version) within your .csproj file
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
add a comment |
Make sure you have
<PackageReference Include="Microsoft.AspNetCore.Session" Vesion="1.1.1" />
(or more up-to-date version) within your .csproj file
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
add a comment |
Make sure you have
<PackageReference Include="Microsoft.AspNetCore.Session" Vesion="1.1.1" />
(or more up-to-date version) within your .csproj file
Make sure you have
<PackageReference Include="Microsoft.AspNetCore.Session" Vesion="1.1.1" />
(or more up-to-date version) within your .csproj file
answered Dec 19 '17 at 17:51
coolhand
404216
404216
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
add a comment |
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
To much late buddy !
– RajeeshMenoth
Dec 21 '17 at 4:18
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
This is meant for others who come across this post with a similar error, but different root cause. If rebooting was the fix, I would suggest deleting this question/answer as it is probably of limited use to others
– coolhand
Dec 26 '17 at 21:36
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
Whenever people posting any questions in SO , they will mention the exact reason of the bug. Question 4 U , "Session" package already existing in the given code then why are you trying to downgrade the package version without any reason ?.
– RajeeshMenoth
Dec 28 '17 at 10:33
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
I'm not, that's why i put the parenthetical comment
– coolhand
Dec 28 '17 at 14:21
add a comment |
In my case AutoMapper.Extensions.Microsoft.DependencyInjection (v1 was installed). Uninstalled and installed AutoMapper.Extensions.Microsoft.DependencyInjection v5.0.1
add a comment |
In my case AutoMapper.Extensions.Microsoft.DependencyInjection (v1 was installed). Uninstalled and installed AutoMapper.Extensions.Microsoft.DependencyInjection v5.0.1
add a comment |
In my case AutoMapper.Extensions.Microsoft.DependencyInjection (v1 was installed). Uninstalled and installed AutoMapper.Extensions.Microsoft.DependencyInjection v5.0.1
In my case AutoMapper.Extensions.Microsoft.DependencyInjection (v1 was installed). Uninstalled and installed AutoMapper.Extensions.Microsoft.DependencyInjection v5.0.1
answered Nov 11 at 15:50
Patrick
1,181916
1,181916
add a comment |
add a comment |
Adding the nuget package for Scrutor fixed it for me
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
add a comment |
Adding the nuget package for Scrutor fixed it for me
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
add a comment |
Adding the nuget package for Scrutor fixed it for me
Adding the nuget package for Scrutor fixed it for me
edited Nov 5 at 20:52
answered Nov 5 at 16:14
zlopez119
165
165
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
add a comment |
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Mozahler
Nov 5 at 18:48
ok just removed it
– zlopez119
Nov 5 at 20:53
ok just removed it
– zlopez119
Nov 5 at 20:53
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44409554%2fiservicecollection-does-not-contain-a-definition-for-addsession%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Building seems to work fine. Visual Studio might just be off here, did you try to restart it?
– Henk Mollema
Jun 7 '17 at 10:10
@HenkMollema Yes, It's throwing the same issue.
– RajeeshMenoth
Jun 7 '17 at 10:12
Well-known problem. Try stackoverflow.com/a/43562917/5112433
– Ilya Chumakov
Jun 7 '17 at 13:18
Now it's working !! I just restarted my machine.
– RajeeshMenoth
Jun 10 '17 at 8:24
@llya Chumakov well known yet ignored by microsoft
– JSON
Nov 2 at 15:39