Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LightInject.SignalR doesn't work without LightInject.Interception #147

Open
Hinidu opened this issue Dec 23, 2014 · 5 comments · May be fixed by #148
Open

LightInject.SignalR doesn't work without LightInject.Interception #147

Hinidu opened this issue Dec 23, 2014 · 5 comments · May be fixed by #148

Comments

@Hinidu
Copy link

Hinidu commented Dec 23, 2014

Hello!
I've just tried to use LightInject.SignalR and got an exception:

System.Reflection.TargetInvocationException was unhandled
  HResult=-2146232828
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
       at Owin.Loader.DefaultLoader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder)
       at Owin.Loader.DefaultLoader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder)
       at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
       at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
       at Microsoft.Owin.Hosting.Starter.DirectHostingStarter.Start(StartOptions options)
       at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options)
       at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options)
       at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options)
       at Microsoft.Owin.Hosting.WebApp.Start(String url)
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.IO.FileNotFoundException
       HResult=-2147024894
       Message=Could not load file or assembly 'LightInject.Interception, Version=1.0.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
       Source=LightInject.SignalR
       FileName=LightInject.Interception, Version=1.0.0.4, Culture=neutral, PublicKeyToken=null
       FusionLog==== Pre-bind state information ===
LOG: DisplayName = LightInject.Interception, Version=1.0.0.4, Culture=neutral, PublicKeyToken=null

Installing LightInject.Interception fixes the issue.
I didn't register anything in ServiceContainer. I just call serviceContainer.EnableSignalR(hubConfiguration); and this line produces exception above.

@Hinidu
Copy link
Author

Hinidu commented Dec 23, 2014

@seesharper
Copy link
Owner

That is correct. LightInject.SignalR requires Lightinject.interception. If
the NuGet package does not install it, I need to update the package.
On Tuesday, December 23, 2014, Pavel Platto notifications@github.com
wrote:

It seems like it is needed because of this:
https://github.com/seesharper/LightInject/blob/master/LightInject.SignalR/LightInject.SignalR.cs#L98-L99


Reply to this email directly or view it on GitHub
#147 (comment)
.

@Hinidu Hinidu linked a pull request Dec 24, 2014 that will close this issue
@puzsol
Copy link

puzsol commented Nov 19, 2015

The LightInject.SignalR nuget package still does not automatically include the LightInject.Interceptor package.

@Hinidu
Copy link
Author

Hinidu commented Nov 19, 2015

@puzsol @seesharper I've just updated my PR #148. I've realized that to specify dependency I should modify .nuspec file rather than packages.config. I understand that it is entirely my fault to not learn how NuGet packages are creating but this issue wouldn't hang so long if someone could comment that PR =\

@puzsol
Copy link

puzsol commented Nov 20, 2015

I didn't omit any of my knowledge on nuget packages 😄
Thanks for working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants