Skip to content

How to build and run on Windows?

Alex Folland edited this page Mar 3, 2017 · 8 revisions

I recommend you use Visual Studio Code for development, as it will automatically format the files in the right way.

Building with Visual Studio Code

  • I have not tested this project in Visual Studio, only in Visual Studio Code, but it will probably work in Visual Studio without any issues. If you wish to contribute code, please use Visual Studio Code.
  • You need to install the .NET Core 1.1 SDK, available here: https://www.microsoft.com/net/core#windowscmd
  • You also need to install the C# for Visual Studio Code (powered by OmniSharp) extension, which will automatically be recommended once you open the project
  • Open the project folder with Visual Studio Code
  • VScode will ask you to Restore depencencies, click on the Restore button
  • To build the project, press Ctrl+Shift+B
  • To build and run the project, press F5
  • To build and run the project without debugging as it may not work in Windows, press Ctrl+F5 or click "Debug", then "Start Without Debugging"
  • Under the debug tab, there's a couple of options available:
    • Launch Game will run the game normally
    • Launch Setup will start the game with the Setup screen
    • Launch Demo will show a demo screen
    • Attach to process will allow you to bind the debugger to an already-running instance. You will probably not need this option

Building with Microsoft Visual Studio 2015

Note: While this is problably the easiest way to get the project running, it is not recommended if you plan on contributing code. Visual Studio will make unwanted changes to the project file and it will probably mess with the line endings and tab indents.

Building and running without Visual Studio (Code)

  • You need to install the .NET Core 1.1 SDK, available here: https://www.microsoft.com/net/core#windowscmd
  • Open a command prompt or Powershell window, and browse to the CivOne folder
  • The first time, you need to run the following command: dotnet restore
  • After that, you can build the project by typing: dotnet build
  • You can run the project by typing: dotnet run