How to use Nuclex Framework without requiring to install Microsoft XNA Framework Runtime?

Jan 28, 2010 at 11:40 PM


I've developed a small console application using Nuclex Rectangle Packing algorithm. I want to execute the application on other machines where Microsoft XNA Framework Runtime may not be installed. Currently, when I try to do that, it gives me FileNotFoundException - Module not found without mentioning any file name. When I install the runtime it runs fine. I tried copying XNA framework assemblies in the same directory as that of my EXE but that doesn't change the exception.

Is it possible to achieve such thing? If yes, How?

Thanks in advance for your help.



Jan 29, 2010 at 5:56 AM
Edited Jan 29, 2010 at 5:57 AM

The RectanglePacker classes rely on the Microsoft.Xna.Framework.Point class. To use them without the XNA Framework, just copy everything in the Nuclex.Game\Source\Packing directory into another project and change the code to use another Point class (eg. System.Drawing.Point should work with minimal modifications).

Small tip: to get additional informations on "Module not found" exceptions, you can enable .NET's FusionLog (it works even on a non-developer machine). Google for it, it's a plain old registry value to set and then the exceptions will provide informations about who tried to load what module ;)