1. Computing & Technology

Discuss in my forum

Compiling Space Trade with Visual C# 2005 Express Edition

By , About.com Guide

See More About:

2 of 2

Fixing the Compiler Errors
Upgrade Wizard Dialog
Run Microsoft Visual C# 2005 Express Edition and open the solution file SpaceTrader.sln. You will then see the upgrade conversion wizard. Press the Finish button. You will be asked if you want to permanently remove the source (version) control bindings. Unless you know what you are doing, you should click Yes. That completes the upgrade but if you press F6 you will see a number of compile errors and a warning.

The errors are all to do with ambiguity of the type of number literals that are actually double but are int in the source code. Adding a .0 to them, has the compiler treat them as double and the errors are fixed.

Do the following. Click on the errors one by one. The line numbers you click should be shown on the bottom status line.

  1. On line 3076 of Form_spaceTrader.cs change 100 to 100.0
  2. On line 1741 of Game.cs change / 100 to / 100.0
  3. On line 1803 of Game.cs change / 50 to / 50.0
  4. On line 1127 of Ship.cs change / 100 to / 100.0
  5. On line 1223 of Ship.cs change / 100 to / 100.0
If you press the F6 key, it should now compile with just one warning. You can disregard this warning- usually I prefer all warnings to be addressed but this one can be ignored. Now press F5 and the game should run!

©2012 About.com. All rights reserved.

A part of The New York Times Company.