• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Barguast

SlimDX for .NET 4

12 posts in this topic

I'm currently testing distribute of a .NET 4.0 application which uses SlimDX. It works on my machine, but not on another.

I'm installing the June 2010 '.NET 2.0 End User Runtime' and I suspect this is the problem - mine is a .NET 4.0 application. Is there a .NET 4.0 End User Runtime, or am I barking up the wrong tree?

The error certainly looks like there is an assembly missing - I used to get a 'FileNotFoundException' but now am getting the following (from Event Viewer) after copying the SlimDX DLLs from the developer SDK.
Quote:
Exception Info: System.BadImageFormatException
Stack:
at TestApp01.Program.Main()


Just so I can rule it out, what pre-requisite steps do I need to do perform on other machines in order to prepare for .NET 4 / SlimDX applications?

Thanks.
0

Share this post


Link to post
Share on other sites
I just installed the Developer SDK on the target machine, and this caused the program to start working. I think this confirms that the End-User Runtime isn't sufficient, nor is including the .NET 4.0 / x86 SlimDX.dll with the executable.

Hopefully someone can let me know the file to distribute?

Thanks
0

Share this post


Link to post
Share on other sites
We have plans to release a .NET 4 end user runtime, but they've been delayed thus far because the new VC redists for VS2010 have been separated into discrete x86 and x64 versions, making it impossible to use both together in a single installer.

We were looking for workarounds for this, but it doesn't look like we'll be able to avoid producing two separate installers.

Until such time, you'll need to distribute the .NET 4 DLLs alongside your app. You're getting a BadImageFormatException because you're referencing the wrong one for the given platform (x86 or x64).
0

Share this post


Link to post
Share on other sites
So I'll need to include the x86 or x64 DLL in with the executable, depending on whether they are using 32- or 64-bit Windows? That's doable.

Or will I need to build a separate 32- and 64-bit version of my application (each using the corresponding SlimDX version)? That's less doable! :p

Thanks for your reply.
0

Share this post


Link to post
Share on other sites
Sorry to bump and basically repeat my question, but I've now gotten to the point where I want to get my application working on another machine.

Again, it's a .NET 4.0 application which uses the June 2010 distribution of SlimDX. So far, I've only been able to get it working on another (non-developer) machine by installing the full SDK, since there is no .NET 4.0 runtime.

Are there certain files within the SDK which I can distribute to get it working? I'm happy to detect whether the target machine is x86 or x64 if that's the complication.

Any help would be greatly appreciated.

Thanks.
0

Share this post


Link to post
Share on other sites
You need four things installed in order to run a SlimDX application:

  • The .NET Framework.

  • The current DirectX runtime.

  • The Visual Studio 2010 runtime.

  • The SlimDX DLL.


The SlimDX runtime installer takes care of making sure that all but the first item are installed. For .NET 4, we don't provide an installer yet, so you'll have to make sure it's all there on your own.

The VC10 and the SlimDX DLL both have separate versions for x86 and x64. Make sure you include the correct version for your target platform.
0

Share this post


Link to post
Share on other sites
Thanks - I'll try this first thing tomorrow. :)

I'm assuming you meant to say 'Visual C++ Runtime' in your checklist? So I don't need SlimDX installed at all, I just need to drop the SlimDX.dll (from the net40 folder in the SDK) into the same application folder?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Barguast
Thanks - I'll try this first thing tomorrow. :)

I'm assuming you meant to say 'Visual C++ Runtime' in your checklist? So I don't need SlimDX installed at all, I just need to drop the SlimDX.dll (from the net40 folder in the SDK) into the same application folder?


Correct.
0

Share this post


Link to post
Share on other sites
OK, I got it working on a x86 machine by installing the Visual C++ Runtime, and .NET 4.0. Easy. :)

However, my x64 test machine is still complaining with the 'BadImageFormatException' which I assume it because it doesn't like me dropping in the x64 SlimDX DLL to replace the x86 one it's built against.

Is there any way I can build my application to allow the appropriate SlimDX DLL to be dropped in? I've tried settings 'Specific Version' of the DLL reference to false, but this doesn't seem to have any effect.
0

Share this post


Link to post
Share on other sites
How are you building the application? As AnyCPU, x86, x64, etc? Also, have you installed the x64 version of the VC++ Runtime? Starting with VS 2010 there are separate versions of that runtime.
0

Share this post


Link to post
Share on other sites
I -think- it was due to the Platform being 'Mixed Platform'. I altered this to 'Any CPU' and it seems to do the trick, however it also seems to have broken Visual Studio a bit - 'Build' > 'Rebuild' has no effect, but right-clicking a project and 'Rebuild' does..!

I can live with that though. Hopefully the Platform setting was the problem - I'm going to test it on some more machines to find out.

Thanks again.
0

Share this post


Link to post
Share on other sites
The project is probably not set to build in that configuration. Open up the configuration manager and make sure the project is checked off as being included.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0