-
Notifications
You must be signed in to change notification settings - Fork 50
How to build and run on Windows?
SWY1985 edited this page Dec 7, 2017
·
8 revisions
I recommend you use Visual Studio Code for development, as it will automatically format the files in the right way.
- 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 2.0 SDK, available here: https://www.microsoft.com/net/learn/get-started/windows
- 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
- 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
- Launch Free will start the game without loading game data files
- Launch Win32 will start the experimental .NET 4.7 version of the game, but debugging will probably not work correctly
- Launch OpenTK will launch the OpenTK runtime, which is no longer maintained
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.
- You need to have the .NET Core extensions installed, they are available in the Visual Studio 2017 installer
- I'm not sure, but you will probably need to install the .NET Core 2.0 SDK as well. It is available here: https://www.microsoft.com/net/learn/get-started/windows
- Browse to File > Open > Project/Solution
- Choose the CivOne.sln file in the CivOne folder
- Press F5 to build and run
- You need to install the .NET Core 2.0 SDK, available here: https://www.microsoft.com/net/learn/get-started/windows
- 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
...