столкнулся с проблемой. Я хотел сделать так, чтобы плагин для сервера отправлял сообщения через Webhook в discord.
Webhook hook = new Webhook("hook")
{
Name = "Сервер",
ProfilePictureUrl = "https://i.imgur.com/YQDOQ5W.png"
};
Подключение к вебхуку "hook" происходит при смерти игрока. Так вот, проблема в том, что при попытке вызвать подключение появляется ошибка BadImageFormatException.
[Error] Error in MulticastDelegate PlayerDeath: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException
at (wrapper managed-to-native) System.AppDomain:LoadAssemblyRaw (System.AppDomain,byte[],byte[],System.Security.Policy.Evidence,bool)
at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence, System.Boolean refonly) [0x0000e] in <cfc149f8218b496788d8493c87de777a>:0
at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (byte[],byte[],System.Security.Policy.Evidence)
at System.AppDomain.Load (System.Byte[] rawAssembly) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (byte[])
at System.Reflection.Assembly.Load (System.Byte[] rawAssembly) [0x00005] in <cfc149f8218b496788d8493c87de777a>:0
at Rocket.Core.Plugins.RocketPluginManager.<Awake>m__4 (System.Object sender, System.ResolveEventArgs args) [0x0001e] in <466fa14d466749559a64a11ae8acbc60>:0
at System.AppDomain.DoAssemblyResolve (System.String name, System.Reflection.Assembly requestingAssembly, System.Boolean refonly) [0x00075] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <cfc149f8218b496788d8493c87de777a>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <cfc149f8218b496788d8493c87de777a>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <cfc149f8218b496788d8493c87de777a>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <cfc149f8218b496788d8493c87de777a>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at Rocket.Core.Extensions.MulticastDelegateExtension.TryInvoke (System.MulticastDelegate theDelegate, System.Object[] args) [0x00019] in <466fa14d466749559a64a11ae8acbc60>:0
[26.07.2019 12:58:39] [Error] Error in MulticastDelegate PlayerDeath: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException
at (wrapper managed-to-native) System.AppDomain:LoadAssemblyRaw (System.AppDomain,byte[],byte[],System.Security.Policy.Evidence,bool)
at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence, System.Boolean refonly) [0x0000e] in <cfc149f8218b496788d8493c87de777a>:0
at System.AppDomain.Load (System.Byte[] rawAssembly, System.Byte[] rawSymbolStore, System.Security.Policy.Evidence securityEvidence) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (byte[],byte[],System.Security.Policy.Evidence)
at System.AppDomain.Load (System.Byte[] rawAssembly) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (byte[])
at System.Reflection.Assembly.Load (System.Byte[] rawAssembly) [0x00005] in <cfc149f8218b496788d8493c87de777a>:0
at Rocket.Core.Plugins.RocketPluginManager.<Awake>m__4 (System.Object sender, System.ResolveEventArgs args) [0x0001e] in <466fa14d466749559a64a11ae8acbc60>:0
at System.AppDomain.DoAssemblyResolve (System.String name, System.Reflection.Assembly requestingAssembly, System.Boolean refonly) [0x00075] in <cfc149f8218b496788d8493c87de777a>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <cfc149f8218b496788d8493c87de777a>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <cfc149f8218b496788d8493c87de777a>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <cfc149f8218b496788d8493c87de777a>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <cfc149f8218b496788d8493c87de777a>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <cfc149f8218b496788d8493c87de777a>:0
at Rocket.Core.Extensions.MulticastDelegateExtension.TryInvoke (System.MulticastDelegate theDelegate, System.Object[] args) [0x00019] in <466fa14d466749559a64a11ae8acbc60>:0
Предполагаю, что ошибка связана с System.Net.Http. Версия проекта 4.5, версия System.Net.Http 4.0.0.0. Помогите, кто может, пожалуйста.
Проблема решена экспериментами с версией .NET, а также установкой nuget system.net.http.
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Перевод документов на английский язык: Важность и ключевые аспекты
У меня есть дефолтный список людей
Нужно обработать клик мыши с зажатой клавишей, к примеру CTRL, по элементу управления КнопкаЯ так понимаю, обрабатываться всё же будем в обработчике...
ЗдравствутйеВозник вопрос, так как я чайник, то решил обратиться к вам