After some time of using Ninject without a problem I ran into strange problem with the library Ninject.Extensions.Factory.
My code was compiling and run fine without any of above mention errors.
What's more even if I reverse into revision which was checked and worked perfectly fine the same error occurs.
The problem is that now when calling some of my:
IFactory.GetSomeFactory();
The Following exception is rising:
Message : JIT Compiler encountered an internal limitation.
Source: Ninject.Extensions.Factory
StackTrace:(only top of the stack)
at Ninject.Extensions.Factory.Factory.InstanceResolver.Get(Type type, String name, Func`2 constraint, IConstructorArgument[] constructorArguments, Boolean fallback)
at Ninject.Extensions.Factory.StandardInstanceProvider.GetInstance(IInstanceResolver instanceResolver, MethodInfo methodInfo, Object[] arguments)
at Ninject.Extensions.Factory.FactoryInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
I tried to clear cache of nuget and re-download the libraries but that doesn't help.
Maybe any of You run into similar problem and have some out of the box solution ?
Thanks in Advance for any helps and tips how to solve the Issue.
You should try turning off IntelliTrace as there's a "known issue" where IntelliTrace can cause this problem, also see https://connect.microsoft.com/VisualStudio/feedback/details/872506/jit-compiler-encountered-an-internal-limitation
Tools --> Options --> IntelliTrace --> [ ] Enable IntelliTrace
Instead of turning it off completely, it may be enough to set IntelliSense settings to "Show Events Only".