Closed anuraj closed 9 years ago
Sounds like you're mixing versions of things. What version of the KRE are you using? What version of MVC are you using?
KRE - 1.0.0-beta1 MVC - 6.0.0-beta1
Are you sure?
Yes
Directory of C:\Users\Anuraj.kre\packages 12/22/2014 07:10 AM
And
Directory of C:\Users\Anuraj.kpm\packages\Microsoft.AspNet.Mvc 12/22/2014 06:54 AM
And here is output of KVM list
ServiceCollectionExtensions
previously lived in the Microsoft.Framework.DependencyInjection.Fallback
namespace. As @davidfowl said it makes me thing you have some old versions stuck somewhere.
I tried upgrading kvm, changed runtime, removed .kpm and .kre folders still issue exists
Do you have a different "packages"
folder configured in your global.json
?
No. I don't have a packages
folder configured in global.json
. I don't have a global.json file
Not sure, but I found something like this, when ever I add reference of SignalR it is creating problem. If I remove SignalR reference, and kpm restore
, it is working without any issue. Is there any relation / dependencies?
Nope, it just sounds like a version mismatch.
Right now I can fix it by removing the SignalR reference, but I am facing same issue with Moq reference.
Could you copy paste your project.json
contents and the output of your kvm list
command to the bug?
Yep, This specific exception just means that you're mixing versions like beta1,beta2 rc1 of different things. And then there's the KRE version. It's always been that issue. Are you aware of what concrete versions are the packages and KRE you are actually referencing?
project.json
Result of KVM list command
k --version
returns 1.0.0-beta1-10662
@anuraj Microsoft.Framework.CodeGenerators.Mvc
has version 1.0.0-*
defined. Can you check if that is pulling in beta2 packages ?
No I think - Here is the result from kpm restore
ok so you have a mixture of rc1
beta2
packages and you are running against beta1
version kvm. Your kpm restore should restore all beta1 packages for consistency
Rc1
bits are from the myget feed - but you can some beta1
bits. Try replacing all *
s in project.json
with beta1
and change xunit.runner.kre
to Xunit.KRunner
. I think xunit.runner.kre
is available only in the myget feed.
Or alternatively you can fully switch using the the latest RC1
bits and that should work as well.
For myget feed url: https://github.com/aspnet/MusicStore/blob/dev/NuGet.Config#L4. To pull down all the latest bits from myget feed use a *
in version numbers of applicable packages like this :
https://github.com/aspnet/MusicStore/blob/dev/src/MusicStore/project.json
https://github.com/aspnet/MusicStore/blob/dev/test/E2ETests/project.json
I am getting an exception like this System.TypeLoadException: Could not load type 'Microsoft.Framework.DependencyInjection.Fallback.ServiceCollectionExtensions' from assembly 'Microsoft.Framework. DependencyInjection, Version=1.0.0.0, ulture=neutral, PublicKeyToken=null'. at Microsoft.AspNet.Hosting.Program.Main(String[] args)
while running my web app using k web command. Application is compilable using kpm build
I tried upgrading kvm, changed runtime, removed .kpm and .kre folders still issue exists