Says game won't run another PC unless it has .Net core installed on it

I made this Memory Match game with MonoGame using Nez and sent the game files to my brother’s PC to see if it will run and it got this error:
90525548-af7c4d80-e16f-11ea-9964-3c7960f34be4

I’d like the game to run on other people’s PC but it says it must has .Net Core installed on it in order to run.

A few things worth mentioning:

  1. I’m using Nez and I tried putting the Nez files in the same folder as the executable and referenced that and that didn’t do anything.
  2. I made the game going with with MonoGame Cross-Platform Desktop Application (Open GL)
  3. The folder path to the executable is at MemoryMatch/bin/netcoreapp3.1/MemoryMatch.exe
  4. This problem has happened since I’ve upgraded to MonoGame 3.8. When I used 3.7 the executable was in the path [Project Name]/bin/DesktopGL/AnyCPU/Debug/[Project Name].exe and it worked running on different PCs when it was like that
  5. The code is here if there’s anything you can find: https://github.com/hckscripter6/MemoryMatch

I hope this information is useful in getting to the bottom of this. Let me know how I can get the game to run on another person’s PC without them having to install .Net Core like it has been saying.

First time posting and I’m glad to be in the network!

It’s normal for coding languages like Java and C# to require a runtime installed to run the code because of technical reasons. There’s pros and cons to this, but if you want to take away the runtime install requirement you have to publish your game as a self-contained app and the runtime will be bundled with your game.

This entire page is worth reading https://docs.microsoft.com/en-us/dotnet/core/deploying/

1 Like

It worked using the self-contained method described in the article. I’m just curious if it’s normal for a bunch off these files with the .dll extension to fill the same folder as the executable. Thank you in any case!

Yes of course. That is the runtime being bundled with the game, which is why all these extra files are there. One of the cons of bundling the runtime with your game is that your game is going to have more files and will take more space on the disk.

If you find this messy you can use the PublishSingleFile flag when publishing and all of your game code will be condensed into one file. One con of this is that that patching will require more bandwidth from the end user, because you have to reupload all the game code every time you publish a patch, even if you change only a single line of code.

This entire page is worth reading. https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish

1 Like

I don’t mind the larger file size that comes with the self-contained method as long as it doesn’t affect performance of so-far simple 2D games (that will increase in complexity as I get better). I’m able to clean it up by putting the runtime files in a different folder while creating a shortcut to it so I don’t mind it as much now. Thanks again!