   [.net] Statically Linking .Net, SAPI, and MDX
  Hey guys,Here's the deal. I've got this great game that a team of us wrote for our senior project and I want to distribute it. It has a lot of dependencies, including .Net 2.0, MDX, and the MS Speech API. Writing custom installers to handle these dependencies seems pretty tedious, so I want to statically link everything into the executeable.I know this is not the preferred MS solution and will probably result in a 100 MB executeable, but if it's possible, it seems like the easiest solution. All I really care about is being able to distribute it to people with broadband.Failing this - how can I find the exact DLLs that my C# program needs to run? I will just put all those in the application directory. Again, not the preferred MS solution, but those guys should have made redistributing .Net projects easier than they have.   
  Run your program, attach to it with a debugger and it will list all DLLs loaded by your program.Although that won't really help :)   ;  Maybe I am operating under a flawed assumption - is it true that all the .Net 2.0 stuff is in DLLs? It doesn't depend on reg keys or windows services being installed, or anything like that, right?   ;  Uh no. For .NET to work properly you need more than just the right DLLs being in the path. For example, the GAC is integral to the concept of loading .NET assemblies, but without a proper .NET installation, the GAC won't be present.   ;This is what you want, but it costs a whole lotta $$$.   ;  Build a MSI installer script which on demand(ie: When not present) downloads the additional installer for that component and installs it. I believe there are plenty of tutorials out there on how to have an MSI download and install the .NET 2.0 framework.Toolmaker   ;  Instead of a MSI installer, you can also use ClickOnce deployment. Support for this is a new feature in VS2005, but afaik it should also work for .NET1.1 assemblies. ClickOnce is (to the best of my knowledge) a native application that will take care of installing the .NET framework for you if it's not available and it will handle some nifty features like updating before actually running your program.For installing the correct MDX runtime, you'll need to use the redistibutable that comes with the SDK. This is reportedly the only *legal* way to distibute MDX according to the DX EULA. I know, you could care less but it does work out pretty nicely. You can just distibute the setup exe with the cab files containing the components you need and it will automatically make sure those get installed. All MDX components and dependencies are also part of the standard DirectX runtime, so you can also opt to have people install it through the DX web installer.Ideally the MDX runtime should be included in the ClickOnce deployment, but for that it would need to be a so-called 'bootstrapper package'. You can make these yourself, but I don't have any experience with that yet, plus I don't know if it doesn't also violate the DX EULA. This page on GotDotNet has an old MDX runtime (Sept 2005) available as a bootstrapper package though and it contains some info on making your own. If you get all this to work or find out more on an official bootstrapper for MDX, please check back here [smile]   