How do I deploy to Windows 7?

I’m trying to deploy my game on Win7 Ultimate x32…it seems to crash with some kind of System.PlatformNotSupported error. I am running it in VirtualBox, but one of my friends is running this version of Windows and was saying that it was crashing for him too so I installed Win7 to diagnose. In both cases, I verified that .NET 4.5.2 was installed since that is the target framework.

The solution I created was a Cross Platform Desktop Project, do I need to create a new solution using the Windows Project template?

I noticed with some of the example codes like the StarterKits project it seems like somehow they were able to generate multiple solution files but still referencing the same source code. I don’t know how to set that up. Is there a tutorial somewhere for doing this?

For reference, here is the error that was generated:

 <?xml version="1.0" encoding="UTF-16" ?> 
- <WERReportMetadata>
- <OSVersionInformation>
  <WindowsNTVersion>6.1</WindowsNTVersion> 
  <Build>7601 Service Pack 1</Build> 
  <Product>(0x1): Windows 7 Ultimate</Product> 
  <Edition>Ultimate</Edition> 
  <BuildString>7601.17514.x86fre.win7sp1_rtm.101119-1850</BuildString> 
  <Revision>1130</Revision> 
  <Flavor>Multiprocessor Free</Flavor> 
  <Architecture>X86</Architecture> 
  <LCID>1033</LCID> 
  </OSVersionInformation>
- <ParentProcessInformation>
  <ParentProcessId>1984</ParentProcessId> 
  <ParentProcessPath>C:\Windows\explorer.exe</ParentProcessPath> 
  <ParentProcessCmdLine>C:\Windows\Explorer.EXE</ParentProcessCmdLine> 
  </ParentProcessInformation>
- <ProblemSignatures>
  <EventType>CLR20r3</EventType> 
  <Parameter0>OpenSolitaireMG.exe</Parameter0> 
  <Parameter1>1.0.0.0</Parameter1> 
  <Parameter2>570db2de</Parameter2> 
  <Parameter3>MonoGame.Framework</Parameter3> 
  <Parameter4>3.5.1.1679</Parameter4> 
  <Parameter5>56fb72fd</Parameter5> 
  <Parameter6>9f4</Parameter6> 
  <Parameter7>7f</Parameter7> 
  <Parameter8>System.PlatformNotSupported</Parameter8> 
  </ProblemSignatures>
- <DynamicSignatures>
  <Parameter1>6.1.7601.2.1.0.256.1</Parameter1> 
  <Parameter2>1033</Parameter2> 
  <Parameter22>0a9e</Parameter22> 
  <Parameter23>0a9e372d3b4ad19135b953a78882e789</Parameter23> 
  <Parameter24>0a9e</Parameter24> 
  <Parameter25>0a9e372d3b4ad19135b953a78882e789</Parameter25> 
  </DynamicSignatures>
- <SystemInformation>
  <MID>A437294C-96DA-4DB4-82E6-D6ACC96F5510</MID> 
  <SystemManufacturer>innotek GmbH</SystemManufacturer> 
  <SystemProductName>VirtualBox</SystemProductName> 
  <BIOSVersion>VirtualBox</BIOSVersion> 
  </SystemInformation>
  </WERReportMetadata>

hm, so I am not sure on my terminology here, but have you verified that your project is set for that architecture?

You should maybe check your configuration manager (in the drop-down menu to the left of ‘play’) and see if things are configured for his machine?

-So you arent running 64 bit instructions on a 32 bit machine, is what Im getting at…

  1. Content Pipeline does not work on 32 bit OS, you need to use a 64 bit OS for development, or in your case a 64 bit virtual machine
  2. VirtualBox doesn’t handle OpenGL correctly, use VMWare Player instead https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0

Well my development environment is Win10 x64. Does MonoGame not support Win7 x32 deployment? That seems like a pretty large target demographic. My deployment dropdown box in VS2015 says x86 so it would seem like if I do a release build it ought to execute with 32-bit deployment?

Can you be more specific on what isn’t handled correctly? OpenGL seems to work ok when I test my game with a Linux deployment; I just have to use the hardware mouse option in VirtualBox to get it to capture the mouse interactions. I guess I can test VMWare Player to see if it works better.

Well It says x86 in that drop down box, is there something special I have to do to target Win7?

Yeah, but that ‘x86’ isnt a setting - its more of a template name, as I understand it - the ACTUAL settings for that selection are set in the ‘configuration manager’…

Its in the same drop down menu.

hm well it doesn’t seem like it gives me many options. I can add an x64 build and Any CPU build but that’s about it. I guess I can try an Any CPU build and see if that works.

here’s the error dialog that pops up on win7 x32

I see the platform is indeed set to x86…

You could see if the executable from your release folder run without an installer… Just copy the whole directory.

Thats how I have distributed my little games, in rar archives.

At least if you try that, you can verify that the code can infact run on his machine, and that the problem is with the deploy/installation process…

Also, just in case, I found a problem recently when I did a fresh windows intsall, and upgraded to visual 2015 and monogame 3.5 :

The data I loaded from text files would suddenly cause bizarre crashes, because for some reason, now ‘.’ is used in floats where it was ‘,’ before… So I had to go through my files, replacing commas with periods…

-If something like that is WINDOWS INSTALLATION specific, which has been suggested on this site,
you might be having some similar issue…

just saying, it could be something totally out there…

I tried just copying the folder over but it still gave me the same error message :confused:

I’m going to create a new solution that targets Windows/DirectX instead of OpenGL and see if that makes a difference

Ok… Share how it goes. Might help trouble shoot!

1 Like

Hmm well the DirectX build didn’t work, but I got the OpenGL build working by enabling 3d acceleration and rebooting into safe mode to reinstall the VirtualBox Guest Additions. Since it works on my end now, I’m not sure what is going on with my friend’s computer but at least it seems like it’s deploying properly now. I’ll give him the clickonce file and see if that works better.

Now that I did all that setup with win7 I’m going to install VS2010 and XNA 4.0 so I can run some of these example projects that won’t run on win10/VS2015/MG.

Oh btw, I’ve had this issue where if the installation/first launch goes wrong, and is aborted/crashes, its like it lingers in the registry or something… Future installation attempts will continue to botch…

I never got to the bottom of it… But I think I got around it by increment file version or something.

Or maybe it was enough to run uninstall… cant remember…

But action was required…