Search Unity

Hololens Batch build with Jenkins

Discussion in 'VR' started by Kron0, Jan 18, 2017.

  1. Kron0

    Kron0

    Joined:
    Jun 26, 2013
    Posts:
    7
    Hello,
    I am trying to set up a build machine using Bitbucket, Jenkins, Unity build commands and the Hololens toolkit.

    I have made menu items which can be called in the Unity editor to build a number of configurations (debug/release/testing). These functions operate correctly.

    When Jenkins attempts to execute these commands the nuget packages cannot be restored due to a project lock file validation failure.

    Internally the build command has three steps.

    - Build Visual studio solution
    - Restore Nuget Packages in command line
    - Build Appx file through MSBuild

    The following log is thrown when the visual studio solution is built showing failure in the nuget package restore at the beginning of the build.
    http://pastebin.com/ahh2Zbcs

    If this step is skipped and the SLN file prepared from the editor build menu, then the APPX fails due to an incorrect directory location as shown in this log file.
    http://pastebin.com/FfmpC74G

    Please advise on the best way to solve these problems
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    The HoloTool kit is a Microsoft open source project, so the best place to get answers would be from their forum site.
    https://forums.hololens.com/discussion/2364/getting-started-with-holotoolkit

    It looks like it is not able run the commands in batch mode.
    Cancelling DisplayDialog: Example Hololens Unity Project WindowsStoreApp Build Failed! Error building Player: Failed to restore NuGet packages.
    This should not be called in batch mode.

    You could try creating a script that Jenkins can run to see that fixes this issue.
     
  3. Kron0

    Kron0

    Joined:
    Jun 26, 2013
    Posts:
    7
    That message is sent from a display window on the build failing, it is not the cause of the build failure. I have removed this line from the function regardless.