stef538 42 Posted November 24, 2014 Hi guys, so i'm about to release my new back to the future mod, but when i test it on my main PC everything is fine, no errors. But if I try it on my Laptop (Which is powerfull enough) I get this message : 2014-11-24 16:44:10 - SEARCHING FOR SCRIPTS... 2014-11-24 16:44:10 - Unable to load Assembly 'scripts\BT-LC TimeTravel.net.dll': System.BadImageFormatException: Could not load file or assembly '6978915 bytes loaded from ScriptHookDotNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Poging om een programma te laden met een onjuiste indeling. File name: '6978915 bytes loaded from ScriptHookDotNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.BadImageFormatException: Bad IL format. at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource) at System.Reflection.Assembly.Load(Byte[] rawAssembly) at GTA.RemoteScriptDomain.LoadAssembly(String Filename) 2014-11-24 16:44:10 - -> InnerException: System.BadImageFormatException: Bad IL format. 2014-11-24 16:44:10 - DONE! No DotNet script found! Also this problem has occured on other pc's. Quote Share this post Link to post Share on other sites
byteMe420 64 Posted November 24, 2014 (edited) both pc's have current .net framework? also are you compiling with obfuscation? make sure you compile with .net 4.0 (i use client profile which is all you need) and x86 settings Edited November 24, 2014 by byteMe420 Quote Share this post Link to post Share on other sites
stef538 42 Posted November 24, 2014 I am not compiling with obfuscation, and yeah they have .net FrameWork 4.5 Quote Share this post Link to post Share on other sites
byteMe420 64 Posted November 24, 2014 did you check if you are compiling with x86 and .net 4.0? Quote Share this post Link to post Share on other sites
stef538 42 Posted November 24, 2014 well Definitly X86, but how do I check if i'm compiling with .net 4 ? Quote Share this post Link to post Share on other sites
Jitnaught 377 Posted November 24, 2014 (edited) well Definitly X86, but how do I check if i'm compiling with .net 4 ? Project -> *project name* Properties... -> Target framework I don't think compiling with .NET Framework 4.5 would be the problem though, as I compile my mods with 4.5 and they work for me and everyone on GTA4-Mods.com. Edited November 24, 2014 by LetsPlayOrDy Quote Share this post Link to post Share on other sites
stef538 42 Posted November 24, 2014 Alright, well I listed .NET Framework 4.0 Client as Active, but whenever I do that it gives me errors in scripthook.dll. So i'm trying some other frameworks. Quote Share this post Link to post Share on other sites
byteMe420 64 Posted November 24, 2014 only suggestion is to try and recompile, if not reinstall .net http://stackoverflow.com/questions/13416240/what-does-bad-il-range-exception-mean Alright, well I listed .NET Framework 4.0 Client as Active, but whenever I do that it gives me errors in scripthook.dll. So i'm trying some other frameworks. do you mean scripthookdotnet.dll? that was compiled with 4.0 so it should not, probably Visual Studio settings are wrong somewhere Quote Share this post Link to post Share on other sites
stef538 42 Posted November 24, 2014 yeah I meant ScriptHookDotNet.dll, So i'll be reinstalling windows soon. just a clean install and then I try again thanks guy. Quote Share this post Link to post Share on other sites
stef538 42 Posted November 25, 2014 Didn't work Quote Share this post Link to post Share on other sites
Rugz007 32 Posted November 25, 2014 So that's kinda strange... Can you give me the file... I will test on my com? Quote Share this post Link to post Share on other sites
stef538 42 Posted November 25, 2014 nah, it doesn't work on other pc's then my own. tested it on several pc's. Quote Share this post Link to post Share on other sites
byteMe420 64 Posted November 25, 2014 nah, it doesn't work on other pc's then my own. tested it on several pc's. try compiling the source code on another pc Quote Share this post Link to post Share on other sites
stef538 42 Posted November 26, 2014 Doesn't work either.. Quote Share this post Link to post Share on other sites
byteMe420 64 Posted November 26, 2014 (edited) what references are you using by the way? are you using, for 1.0.7 or eflc, 0.5.1 (1.0.4 uses 0.4.0) scripthook and 1.7.1.7 beta scripthookdotnet? if you don't mind you can pm me your source code and i will try to compile it... im also curious what is in your code that your compiler can't generate IL properly if it is even code related. Edited November 26, 2014 by byteMe420 Quote Share this post Link to post Share on other sites
stef538 42 Posted November 28, 2014 just 1.0.7.0 and 1.7.1.7B scripthookdotnet, But I already threw away the project and started over.. Quote Share this post Link to post Share on other sites