Search Unity

Feedback Could Unity add csproj of each package project into the solution file?

Discussion in 'Package Manager' started by jayatubi, May 15, 2019.

  1. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    65
    The vs sln file generated by Unity editor only contains the project under Assets folder. However, there are also csproj files for each package project next to the sln file. Could Unity editor involve these package project csproj files into the sln as well?
     
  2. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    29
    This should be what is happening. What version of Unity are you using?
     
  3. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    65
    I'm using the 2018.3.10f1. I could see the csproj file generated but they were not added to the sln file.
     
  4. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    29
    That's strange. I just tested it and it does seem to work, albeit I am using 2018.3.12f1. If you have a simple project which reproduces the issue I could take further look.

    Screen Shot 2019-05-16 at 10.58.17 AM.png

    Screen Shot 2019-05-16 at 10.58.26 AM.png
     
  5. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    65

    Maybe you misunderstood what I meant.

    I meant the projects from the Asset folder, such as my own code or asmdef project, would be generated and added into the solution file.

    But the projects from the packages, which were installed via Package Manager, would NOT be added into the solutions file.
     
  6. mathieur

    mathieur

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    29
    Ah! I see what you mean. So I believe that only the in-development packages (eg: those located inside your project's Packages folder) will generate a csproj file. The read-only packages (eg: those installed via package manager window) will indeed not create a csproj. There are ide such as Jetbrains Rider which does have support to automatically add the read-only projects to your solution, but that is dependent on which ide you use.
     
    SugoiDev likes this.
  7. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    65
    Could it be possible for visual studio?
     
    OndrejP likes this.
  8. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    25
    This is essential for development, because it allows you to use Go To Definition (and other IDE features) and see the implementation easily.

    Also it fixes the issue with "missing" XML documentation in referenced packages.
    (e.g. Unity.Entities contains a lot of documentation comments, but they won't show because there's no Unity.Entities.xml in Library\ScriptAssemblies)
     
    Last edited: May 19, 2019
    Erothez and De-Panther like this.
  9. Erothez

    Erothez

    Joined:
    May 27, 2015
    Posts:
    15
    Packages using csproj with default unity folder layout stuff would be nice, been doing some stuff with file:// packages and being able to reference/find stuff and see comments has been a god send.
     
    OndrejP likes this.