Skip to content

First Build

derammo edited this page Apr 21, 2020 · 8 revisions

To build Helios for the first time on Visual Studio 2019, you may need to work around some problems in how Visual Studio handles nuget packages. Specifically, the automatic inclusion of project file snippets from included nuget packages.

For background, see https://sushihangover.github.io/nuget-and-msbuild-targets/

In practice, you may find that Visual Studio does not copy the native libraries to the build output on the first try, so nothing with native binaries will run correctly. This problem was previously observed with the Lua53.dll in various cases.

Case 1: Badass using nuget.exe from the command line anyway:

  • Before opening any solution file, just do nuget restore Helios.sln in the root of your repo clone
  • Now everything works perfectly on the first try
  • Note: Helios 1.6 still requires you to build BuildMeFirst.sln before building Helios.sln the first time, as below

Note: you can get command line nuget here: https://www.nuget.org/downloads

Case 2: You don't use nuget from the command line normally:

The following workaround should be used:

  • Clone the repo

  • Check out the branch you wish to build

  • Open Helios.sln (for 1.4) or BuildMeFirst.sln (for 1.6) in Visual Studio

  • Build the solution

    • this step "installs" the required nuget packages and make their automatic .props files and .targets files available for inclusion
  • Close Visual Studio

  • Open the same solution again

    • this time, Projects will actually include the automatically "included" files
  • Clean solution

  • Build solution

  • If building Helios 1.4, you are now done

  • If building Helios 1.6, building the BuildMeFirst solution will have downloaded the git submodules because Visual Studio does not support them itself. It will also have generated fresh Simulator Viewport Templates that are needed for the Helios build. You can now open and build Helios.sln