Search Unity

Resolved Generating .csproj from command line

Discussion in 'Testing & Automation' started by mdab121, Jun 21, 2019.

  1. mdab121


    May 28, 2018

    We ran into a problem in our CI/CD pipeline (using Unity 2018.3.11):
    1. We use automatic code generation for some files (using Jenny and Entitas).
    2. The project doesn't compile right away when cloned from git. It requires code generation to compile. (auto generated files are gitignored).
    3. Code generation (Jenny) requires a `.csproj` file for the project to generate required classes (which is gitignored as well).


    I'm aware of two solutions at this point:
    1. There's a menu item `Assets>Open C# Project` in Unity. This is not valid, because I'm running the script from a CI machine and cannot click a menu item ;)
    2. Run Unity from command line with batch mode (the same way we run it to create build projects from iOS and Android in our pipeline). Unfortunately it's not possible, because running any method through Unity CLI seems to require the whole project to build.


    Is there any other way to generate a `.csproj` at this point? Or are we required to include either `.csproj` or autogenerated code in the repository?
    XsongyangX likes this.
  2. liortal


    Oct 17, 2012