[Closed] Max 2012 not working with C#… ?
So I’m assuming this is related to issues with Max 2012 yet, after all the things they’ve done, but I’m really not sure.
I have a C# Tool I made that works with Maxscript, and it has worked just fine in Max 2010/2011 32 and 64bit.
But when I go to try in Max 2012 64bit, it loads up my UI, but when I try to load in Bitmaps using the FreeImage Library I’ve added in, it instantly crashes max.
I opened the dump file in VS, and ran a debug, and it said invalidimageformat. Which I’ve seen before, but I fixed those issues before and all was good. So it must not be loading the FreeImage stuff properly for some reason… It’s Dotnet 2.0 though, so would that be an issue possibly?
Thanks!
it is just a guess, but I think it is because maybe they have been integrating more WPF into max and that is .NET Framework 3.0
But like I said, it is a guess.
Unfortunately, I tried compiling my project as 3.5 , and it still didn’t work. Although, the Freeimage library might be something else, I have no idea.
Would I have to compile the FreeImage DLL as Dotnet 3.0 + then separately?
I’m going to install Max 2012 32bit and see if it works in there or not for the hell of it.
Thank you
Alright, so my thought and Nysuatro I think was right.
I installed Max 2012 32bit, and downloaded the new 32bit FreeImage DLL, and then compiled the .Net wrapper in 4.0 as well as my C# tools in 4.0, and it works just fine in Max now.
But, now my issue is, I need to compile a 64bit DLL of FreeImage, but when I try to, I get a ton of errors. I found a 64bit DLL online for my 2010/2011 versions that has been working, but there isn’t a newer version I’ve found.
I may need to ask if someone could please compile in 64 bit. But I am trying now and will see if I can get it figured out. I am using the following link to try and compile.
http://www.sambeauvois.be/blog/2010/05/freeimage-and-x64-projects-yes-you-can/
Ok, well nevermind… I don’t think I did anything different, but I got the 64bit DLL to compile now, and now my stuff works fine in Max 2012 32/64bit :D.
But… now I need to have 4 separate downloads for my tools… grrrr
You could build an installer and include the freeimage.dll. With InnoSetup for example. Net 4.0 should be present anyway since it`s installed by 3dsmax2012.
My .mzp Install does have the FreeImage.dll. But you mean have it detect Max 2012, and install the proper files that way?
I use a .Mzp because its easy to update, and I don’t think most people would trust a .exe install.
your .mzp can run an installer .ms that would detect the correct version and copy the relevant file from the .mzp
Ah, yes… I could do that too I suppose… Maybe I’ll leave it for now, unless I get requests to do that. Thanks