AsterNET.ARI icon indicating copy to clipboard operation
AsterNET.ARI copied to clipboard

WebSocket4Net method not found

Open vnorbix opened this issue 7 years ago • 19 comments

I created a new .NET console project. When I installed AsterNET.ARI from Nuget and tried to run the bridge sample, I got a runtime exception on ActionClient.Connect();.

Method not found: 'Void WebSocket4Net.WebSocket..ctor(System.String, System.String, System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>>, System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>>, System.String, System.String, WebSocket4Net.WebSocketVersion, System.Net.EndPoint)'.

What can be the problem? I tried this with a .NET 4.5 console project, AsterNET.ARI is the latest (1.2).

vnorbix avatar Jan 11 '18 08:01 vnorbix

Yeah, it's a problem with the nuget package, it's installing the wrong version of the dependency. It should be

Try manually updating this from nuget package manager.

skrusty avatar Jan 15 '18 16:01 skrusty

which version of dependencies should be installed?

pavelbunkov4517 avatar Jan 21 '18 17:01 pavelbunkov4517

0.15.0-beta6 or above.

I am looking to update the nuget package today.

skrusty avatar Jan 25 '18 08:01 skrusty

I'm using AsterNET.ARI 1.2.1 in a fresh .NET console project and am getting the following error:

Could not load file or assembly 'WebSocket4Net, Version=0.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Is this related to the issue above?

joelkallman avatar Feb 16 '18 18:02 joelkallman

I will look at this next week, this should have been fixed in the latest version.

What version of the .net runtime are you using?

skrusty avatar Feb 22 '18 10:02 skrusty

I'm using .NET Framework 4.6.1 and I tried to recreate it in a project using .NET Framework 4.5.2. Both versions raise the same exception. Thanks for looking at this! If there's any other tests that I can do, I'd be happy to do so.

joelkallman avatar Feb 23 '18 00:02 joelkallman

Same issue here, running framework 4.6.1. I was able to get around it by manually (re)installing dependencies.

stevoinco avatar Mar 09 '18 23:03 stevoinco

@stevoinco did you installed all dependencies manually ?

ftfunk avatar Mar 19 '18 15:03 ftfunk

This one is still not fixed, I still get the same error as @stevoinco and @joelkallman. I'm compiling the dll for myself at the moment, but I want to remove custom dll so I looked into this.

By default in nuget WebSocket 0.15.0 is installed, when I run my app it complains that it doesn't find 0.15.0.0 of the dll. But the actual dll version exists next to the exe is 0.15.0.9. If I try to update websocket to the latest version in nuget it's 0.15.2, then my app complains that it doesn't find the same version as before, 0.15.0.0. Why is that? Because I updated to version 0.15.2, actual dll version next to the exe is 0.15.2.11 as expected, but it still tries to reference 0.15.0.0 at runtime.

vnorbix avatar May 18 '18 08:05 vnorbix

+1

I've the same problem

sbiaudet avatar May 24 '18 20:05 sbiaudet

Same problem too.

norcis avatar Aug 08 '18 07:08 norcis

+1

anastasiya1kovalenko avatar Aug 21 '18 09:08 anastasiya1kovalenko

+1

KenDFish avatar Aug 22 '18 08:08 KenDFish

+1

Xandir150 avatar Jan 09 '19 12:01 Xandir150

I posted updated dll in the issue#64

nikriaz avatar Jun 22 '19 16:06 nikriaz

This is still a problem with a new project started today. I've tried 4.5 and 4.6.1, WebSocket4Net versions 0.15.0 & 0.15.2 and it get the same error all the time: System.IO.FileLoadException: 'Could not load file or assembly 'WebSocket4Net, Version=0.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

ianef avatar Aug 05 '19 03:08 ianef

If this is the same issue as I reported in issue number 64 (I've just closed it) [ https://github.com/skrusty/AsterNET.ARI/issues/64 ]

Then it should now not be an issue, and I would recommend closing this one too.

shawty avatar Sep 18 '19 16:09 shawty

Issue is not yet resolved completely, it still generate the same error when used in web services

Muhammad-Shoaib-092 avatar Jun 24 '22 17:06 Muhammad-Shoaib-092

I'm no longer having problems with this, but I have moved to .NET 6 now rather than the legacy framework.

shawty avatar Aug 11 '22 15:08 shawty