Question A function that can't be executed if not debugging

Redouane

Member
Joined
Apr 9, 2019
Messages
8
Programming Experience
Beginner
hello all
i made a Discord BOT with.NetCore C#
it works great
yesterday i found a library called AIML, i can use it to create a chatbot
so i worked on it and it worked, well here is the problem: when i click the debug button in visual studio it runs normally and I can use the AIML library cus I tested the chatbot
via discord and he responds
but today i needed the bot to be online so i launched it via CMD : dotnet "SomePath\MyBot.Dll"
and now it runs normally but it can't use the AIML cus the chat commands aren't working
i tried to test from visual studio by debugging and the AIML comes back again :|

EDIT :
i found the problem, the Function BOT.LoadSettings() is called but never completed, it never gets out of it and since the programme is an async it doesn't throw an error
the fonction accept to be called with a string path but same problem it doesn't work if not in visual studio
that's really weird how can the same programme not run without visual studio :|

i'm 100% sure that i'm in the right directory and all DLLs are in place with all the config files

any help please, thnx in advance
 
Last edited:
Does that code eventually have to do any P/Invoke calls? If so, is the native code it call 32-bit specific? So when in the debugger, the default setting is "Any CPU" but "Prefer 32-bit", but if on the command line, it maybe going full on 64-bit and therefore failing.
 
Does that code eventually have to do any P/Invoke calls? If so, is the native code it call 32-bit specific? So when in the debugger, the default setting is "Any CPU" but "Prefer 32-bit", but if on the command line, it maybe going full on 64-bit and therefore failing.
So i should export as 64 bit ?
 
Sorry, I don't know.
 
Back
Top Bottom