Skip to content

Building From Source

Meredith Monticello edited this page Apr 11, 2017 · 10 revisions

Setup

If you'd like to build the SDK from source, you can use the following process:

  1. Install Visual Studio

  2. Download and run the Git LFS installer from the Git LFS website

  3. Install the Git command line extension with the command below. In case of errors, check the next section below for known issues about the Git LFS installer.

    git lfs install

  4. Clone the repo

    git clone https://github.com/Microsoft/WinObjC

  5. From the repo root run the following from a powershell window:

  .\init.ps1
  .\.tools\nuget.exe restore .\build\build.sln

Building from Source (Frameworks)

To build the SDK from source, follow the steps below:

  1. Ensure that you have WinObjC.Tools installed.
  2. Open the build\build.sln in Visual Studio 2017
  3. Build for the Platform and Configuration of your choice. NOTE: "Any CPU" builds for both ARM and x86
  4. build\OutputPackages will contain the built NuGet packages

Building from Source (Tools / Language)

To build the SDK from source, follow the steps below:

  1. Clone all submodules by running from the repo root:
    git submodule update --init --recursive
  2. Ensure that you have WinObjC.Tools installed
  3. From the repo root run the following from a powershell window:
    .\.tools\nuget.exe restore .\tools\tools.sln
  4. Open the tools\tools.sln in Visual Studio 2017
  5. Build for the Platform and Configuration of your choice. NOTE: "Any CPU" builds for both ARM and x86
  6. tools\OutputPackages will contain the built NuGet packages

Git LFS Installer Known Issues

  1. When you run the Git LFS installer, if you choose to change the default installation folder, it’s possible for the git-lfs.exe executable to be installed on your Desktop and not under the path you selected (the git-lfs-uninstaller.exe executable, however, should be automatically installed in the right folder). To fix this, simply copy and paste the git-lfs.exe executable from your Desktop to the folder you chose for the installation.
  2. When trying to install the Git command line extension with the git lfs install command, it’s possible you get the error git: 'lfs' is not a git command. See 'git --help'.That’s because the Git LFS installer did not automatically update the Path system environment variable to include the path of the Git LFS executable git-lfs.exe. Choose one of the 2 options below to solve this:
  • Option 1: copy and paste the git-lfs.exe executable in Git’s bin directory, usually under C:\Program Files\Git\bin.
  • Option 2: if you don’t want to have the git-lfs.exe executable under Git’s bin directory, you can edit the Path system environment variable to include git-lfs.exe’s folder location.
    1. Click on the Start icon and type System
    2. Click on System
    3. Click the Advanced System Settings link in the left column
    4. In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab
    5. In the Environment Variables window, highlight the Path variable in the System variables section and click the Edit button.
    6. Click the New button and type the full path of your git-lfs.exe executable
    7. Click OK to close the Edit environment variables and Environment Variables window