I checked here: How do I get an XNA 4.0 game to run on other machines?, but there's no real solution in it.
I created a completely empty XNA4.0 project, selected Release and compiled it, rar'd up the Release folder and sent it to a non-development PC. Got an Appcrash generic error.
Its probably something standard I'm doing wrong, but no idea what..
Can confirm that both .NET4.0, XNA Redist 4.0 and DirectX are installed on the other machine.
UPDATE: The empty 'new game' loads now, but I have made a program or six over the last years, each of which doesn't run on the other machine. Could someone perhaps link me to 'proper' referencing, assemblies, and such? Google dropped those words more than once in combination with my problem.
UPDATE: I asked a friend to test on his PC, at first, same error, but he forgot to install the XNA 4.0 redist. After that, my files were running fine on his pc. Still, they're not working on my own non-development machine, for some reason. Anyway, thanks for the suggestions, now that I know its local I can probably fix it myself. Suggestions are still welcome.
The end-user needs to have .NET 4.0, the XNA 4.0 Redistributable (not the full game studio), and DirectX installed.
Is there the Dot-Net 4.0 and XNA 4.0 framework installed?
Choose to publish the project and you will get an installer that check and install required libraries for you...
Related
I searched around but I could not find anything on this.
I have programmed a c# application in VS 2010, targeted to .NET Framework 4.0. It has a .DLL and a few config files which I have being copied to the output directory upon compilation. It works great on my computer, I have .NET 4.0 Extended and .NET 4.0 Client installed. I set the build configuration to "release" on "any CPU".
After it compiles I copy all the files from the release directory to a folder on a shared drive, so that multiple computers on the network can execute it. When I execute it from the computer that I used to develop it, it runs great. When others try to execute it starts but just shows a small blank form, and that's it. I make sure that they have .NET 4.0 installed (Both Extended and Client, though I think the full version is what is really required).
I can't for the life of me figure out why it does this.
All machines are running 32 Bit Windows Vista SP2.
Any thoughts? Much appreciation for any help.
It can be a lot of things. First, like one comment, you should do a quick Deployment project and try to install on another computer to see how it work.
If you can't do that, here a couple of things to check:
It can be a network permission problem. I've seens an .NET application that could not be executed on the network for x reason but worked on the desktop. To check, make sur your user copy it on their computer before executing.
I don't think it's a .NET problem because it wouldn't let you start the application.
My guess is that one of your control/library (the one that is not showing) does not have the proper reference when run from another computer. To check, run the application "Dependency Walker" (you can find it on google) and see what DLL are missing from other computers.
That's all I can think for now ! Good luck! You just have to use ellimination method and you will find the problem.
I come to you because I'm desperate. I've developed a GTK# application in C# with the latest MonoDevelop. It's built for .NET framework 4.0 / x86, and the only external library it uses is the official Mysql .Net connector. It's meant to run under Windows XP.
It's the first application I make with this IDE. I was very happy with the results and the development time, but the deployment is a real headache.
It works perfectly on the development machine. The debug is clean. Everything's okay.
Then, as I couldn't find any information about the deployment, I installed a clean XP to try it and see what do I should install on the client's machine.
I've installed the SP3, .NET 4.0 and copied the release package with all the DLLs mentioned in the build log (that made it work outside the MonoDevelop in the development machine). But I'm getting a "the application has encountered a problem and needs to close" error, with no exception, in kernel32.dll, offset 0012aeb.
I've tried to install the .NET 3.5 before the 4.0, updated IE (just in case...), copied more GTK# and Monodevelop DLLs to the exe's folder, installed the Mysql .NET connector, installed Mono 2.8... But nothing. Still getting that unexplained error.
Google and StackOverflow searches didn't help me. I've researched and tried a lot of things in the last twelve hours or more without moving from this machine.
Do you have any advice? What can be causing it? Is there any way to debug the exe (without installing VS...)? Does anyone know what are all the dependencies of this kind of executable?
WinDbg can help you figuring some JIT trouble...
Even though it aint intuitive and require skills, Worth a try. might pop something up.
If it's meant to run under Windows, then you should probably compile it with the Visual C# compiler.
However, more related to your problem - get a debugger in your deployment machine and run the application on it. This is the best way to figure out the problem because we really can't guess it.
Mono Application Deployment Guidelines
There are several options to installing Visual Studio on your production machine, one of them is the Remote Debugging Monitor. It does not require a Visual Studio installation. You can copy the files from your development machine to your server. I've got them under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger.
You can also use it for Remote Debugging of a Project Built Locally.
I've built my first XNA game and when I go to the build folder and execute the exe it works fine, however when I send the game to a friend of mine, he is unable to play the game and it crashes on startup.
I've tested this on several machines, and they all seem to suffer from the same issue.
Is there something I need to do to get it builded correctly and working on other machines?
btw. I did make sure I copied over the content folder from the output directory too, so its not missing its contents.
Chances are you will need to make sure the other computers have both the .NET and XNA Framework's installed. If you do a quick search on Google, you should be able to find the packages that you need, depending on what versions of the runtime's you are using.
For example, here are links to the downloads for the .NET Compact Framework 3.5 and the XNA Framework 4.0.
Note that this may not be all the prerequisites that you need.
It would be nice if you could provide a more detailed description of what kind of crash it is :) Do they get some kind of error message?
Are you using any third party libraries in the build?
Also, the machines that should run the game will need the correct version of the .NET framework, as well as a more specific XNA framework install.
Have you tried letting the users install the XNA Framework Redistributable?
http://www.microsoft.com/download/en/details.aspx?id=20914
See if that fixes the crash :)
There's a good bet that the person doesn't have the right version of the .NET framework or the right version of the XNA redistributable.
My first thought is to try publishing your game with ClickOnce (full disclosure: that's a link to my site, but I think it's still relevant).
That makes it easy for both you and the people you share it with to get the right libraries to run your game. To clarify, the other person does not need to install Visual Studio, Visual C# Express, or XNA Game Studio. There's lightweight redistributable libraries that they need instead, which ClickOnce will figure out for you.
My second suggestion is that it is possible your machine is capable of handling the HiDef profile, while everyone else that you've shared your game with can only handle the Reach profile. If that's your problem, you can change it to build for the Reach profile and fix that problem. That's discussed here, half way through the tutorial: http://rbwhitaker.wikidot.com/xna-project-template
If neither of these suggestions help, please post any sort of stack trace or error message they're getting so that we can try to help you further.
I create a C# application with an injector in it. I'm using CreateRemoteThread & LoadLibrary technique to inject a C++ DLL into another process.
It works fine on my desktop which has VS 2008 installed but It doesn't work with my laptop which does not have VS 2008 installed.
I installed VS 2008 to my laptop and it's been working fine since then.
My question is Do I need to install the entire VS 2008 product (about 4GB) in order to have my program work properly or Do I just need to install or update certain components for it to work?
Even though my laptop is working fine right now but I don't want to waste a good chunk of hard drive for something that I don't really need. And It's always good to learn.
Thanks in advance
Andrew
You are missing the C++ runtime on the target machine. You can either:
Install the redistributable package for the runtime on the target machine.
Link to the runtime statically using the /MT switch.
I'm working on a program in Visual C# 2010 for a friends company and it does not have any .NET installed. I know you can download .NET 3.5 or 4 from Microsofts site, but the accounts that the program will run on will not be able to install anything. Is there a DLL I can download and then place in the programs folder to make it work? Or any other alternative that does not include installing things or downloading things.
Edit: Disregard the 5mb limit: I had mean that if I have to download any program on the computer the program will be executed on, it should be below 5mb. The final application can be double or triple the original programs size.
Thanks,
Varmitharen
Let me answer this directly so that you don't waste neither your time nor your friends: No there isn't other way other than properly installing .NET (or rewriting your application with unmanaged C++ code which is unlikely something you are willing to do). Not to mention that most Windows PC should already have at least .NET 3.5 installed through Windows Update.
The .NET 4.0 Client Profile is 41MB and that's the minimum you get away with.
While there are some options for running .NET applications without installing the framework properly (e.g. VMware ThinApp), I very much doubt that you'll find anything that fits in 5MB...
Heck, just mscorlib from .NET 4 is 5MB, then System.dll is nearly 3.5MB.
If your application can run on top of Mono, you can try using mkbundle, normally the resulting exe file is relatively compact.
Xenocode (now called Spoon Studio, I believe) allows you to deploy a single executable without previously installing the Framework.
It uses some kind of virtualization to achieve this. I don't believe it would fit in just 5 megs - but I might be wrong.
If the framework has not been installed, there will be no interpreter/jitter and .NET programs will not run.
You need to install the framework in order for .NET software to run.