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.
Related
I am using Unity to build an Xcode project which is then used to build to a device for testing. The other devs can build just fine and we use Source Tree to interact with our Git.
So... for some reason, even though both Unity and Xcode throw no compile errors and successfully build the app (precisely: the Xcode project, then the App) when I launch the App it throws a generic connection error (cannot connect to server, check your internet connection).
We are trying to eliminate the culprit (if there is indeed just one) - but strangely, using the same Unity player settings and Xcode settings (as far as we can tell) - all the other devs can build just fine and do not receive this connection error. The device themselves work fine, and connect through an App built from someone else's machine, but if I build it from my Mac, it does not work.
Possibly relevant info: Unity and Xcode are both pretty fresh installs as I haven't used them before starting at this company. Not sure if Xcode or Unity (or both) are overwriting certain project specifics pulled from our Git?
Edit: this was a versioning issue, and my minor version increase was enough to cause it. Lesson learned: always make sure you are running the exact same version of any shared IDE / Engine.
I almost forgot about this question... I solved this by uninstalling the latest version of Unity and then installing the version the other developers were using.
I am not sure what version of Unity I was using at the time of writing - good learning: always post the version of the programs in question. But I do remember it was only a minor update in front of the others. Some small bug fix which ended up causing this connection error.
To anyone else experiencing this problem - if you are having trouble troubleshooting builds and only getting errors from your local machine: make 100% sure you are using the exact same versions of XCode and Unity.
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 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...
Forgive me for asking a common question, but I couldn't quite get what I needed from what I found so far.
First question - SQLite. I am using this DB as in my C#.NET 3.5 windows service and it works great, I was looking for a portable solution, because I would like port my service to a linux daemon etc, using Mono, which seems to support it. However, I am not sure how to implement this. I had thought the dll was compatable, but it seems there is a seperate dll for Mono/.NET which I should have expected. Does this mean I need to seperately code/compile for each platform or is there something that would allow me use of SQLite with the same code on various platforms? I have encountered this a few times in my searches, csharp sqlite, a "reimplementation". To be honest, this is quite new to me, is it of use? The Mono SQlite page says that they Mono.Data.Sqlite code is based on System.Data.SQlite and goes on to say...
"We have chosen this way as means to
provide a migration path for
developers using SQLite in their .NET
applications"
Are they referring to creating a new, seperate binary? Or could I run my code as is with some adaptation?
Second question - GUI. As far as I can tell the two main options for cross platform dev in .NET would be GTK# and Winforms. Again however, its the specifics of implementation that are a bit hazey. Can I create a win forms GUI in visual studio as I normally would then easily migrate this using mono? Or should I develop this in something like X-Develop or MonoDevelop?
Many thanks for your advice/patience :D
To help out a little bit here I used the full mysql dll file that was provided and I was able to compile my program on windows using visual studio, and then deploy it to Linux without changing anything(except the case of the mysql dll file, which is kind of annoying you'll see what I mean at some point).
Also from what I've heard winforms isn't totally supported by mono yet, but I may be wrong. I haven't done a gui cross platform yet, but I would test winforms first, just so you could develop it in visual studio, and if that doesn't work I think GTK should be fine.
You just need to make sure that the dll's are compiled for .net 3.5 or below and you should be fine(90% of the time).
Check this out here, http://www.mono-project.com/MoMA and also the link that chris provided.
Yes, I know there is MonoDevelop. But what if I want to use Textmate instead?
So my question here is aimed at the .Net developer who has developed some C# applications using Textmate. I'm curious as to what their process/workflow is with this setup.
What is the best C# bundle out there for syntax/language grammar?
How do you build your project? (easy to build app for 2.0, 3.0, and/or 3.5 framework?)
Can you easily start a C# application in Visual Studio, and then continue to use TextMate in it's place?
Are there too many pitfalls here in thinking I could do this, and am I just taking crazy pills?
To be honest I still do my actual C# building through a Virtual Machine running Windows, but I edit anything that I can through Textmate.
I use the ASP.Net VB.Net tmbundle and I actually just discovered a C# tmbundle.
I am planning on switching to building in MonoDevelop if I can, but right now I work with teams that only use Windows so to be safe I'm still stuck building in Visual Studio.
I know this is an old question, but I found it along the way when trying to find a C# bundle for TextMate.
The C# bundle has moved from the macromoates svn repos into github at https://github.com/wintermi/csharp-tmbundle.
Hopefully this helps other people looking for the bundle.