0

We have a server application that runs as a Console Application and it has all been working great with 3.x version of XSockets. We are currently upgrading to 4.0 to benefit from the improved binary messaging.

At the moment we have everything building with the new 4.0 assemblies but can't get the server to start and are getting the following;

System.InvalidOperationException - Sequence contains no matching element

When calling...

m_xserver = XSockets.Plugin.Framework.Composable.GetExport<IXSocketServerContainer>();  <--- Exception happening here.

m_xserver.Start();
foreach (var server in m_xserver.Servers)
{
    LOG.DEBUG("XSocket Server {0}", server.ConfigurationSetting.Endpoint);
}

We have checked and double check the Nuget references and compared the files in the output directory. We do have the server code in a DLL that gets called from the EXE but it all worked before moving.

If I "Continue" on the exception I get a stack over flow error after a few seconds.

In a bid to discover what (if any) DLL or Class is causing the issue I put the above code it the beginning of Mani() and commented out everything else. The app still fails in the same way. However if I start to delete the now not required DLLs from the build folder (starts with 102 files of DLL/XML/PDB) then it will start to work when I get to around 21 to 25 DLL files left. This seems very strange as I've tried to vary the deleted files as best I can and a different combination will still allow it to work at around the same number of files!!

Is there a limit to the number of files the Plugin Framework can handle?

I took a deeper look at the files causing this by copying them one by one to a known working XSockets 4.0 Console App. It turns out that a mixture of my DLLs and third party DLLs somehow make the Plugin framework crash. These are..

A number of my own custom DLLs
GalaSoft.MvvmLight.Extras.WPF45.dll
MahApps.Metro.dll
Microsoft.AspNet.SignalR.Client.dll
Microsoft.AspNet.SiganlR.Core.dll
Microsoft.Owin.dll
Microsoft.Owin.Security.dll
RazorEngine.dll
System.Net.Http.Formatting.dll
System.Web.Http.dll
System.Web.Http.SelfHost.dll
System.Windows.Interactivity.dll

Even an unmanaged DLL from Truen TVSN.dll causes the stack overflow to happen.

David Ritchie
  • 527
  • 3
  • 17
  • I took a deeper look at the files causing this by copying them one by one to a known working XSockets 4.0 Console App. It turns out that a mixture of my DLLs and third party DLLs somehow make the Plugin framework crash. These are.. – David Ritchie Aug 03 '14 at 00:25
  • How did you install 4.0? You should use the nuget package manager and the command install-package XSockets -pre – Uffe Aug 03 '14 at 07:15
  • Hey I originally used the Nuget GUI but then uninstalled and used the console. I'll try that again as I have 4 or 5 (out of 30) projects that have the dependency so might have missed one. – David Ritchie Aug 03 '14 at 09:57
  • Do not know if you know this, but the reason was due to a bug in the alpha release of XSockets 4.0. Fixed in the release that is on nuget now. – Uffe Aug 18 '14 at 20:17
  • Thanks Uffe for the great support, I'll plan in a move to 4.0 on the next release now. Cheers – David Ritchie Aug 19 '14 at 08:28

0 Answers0