Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Building managed Assembly-CSharp dlls for standalone build In Visual Studio

Discussion in 'Code Editors & IDEs' started by dbalz3, Sep 27, 2019.

  1. dbalz3

    dbalz3

    Joined:
    Nov 22, 2017
    Posts:
    2
    I have a working Unity-made linux standalone build I created. In this build, there is a folder of Managed code where the dlls are stored. Two of the dlls are the Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll.

    Without using the unity editor at all or making a new full standalone build, I would like to be able to use only the Visual Studio Project "build" tab to create the necessary Assembly-CSharp dlls and then sub these newly created dlls into the original Unity-made linux standalone Managed subfolder and have everything run smoothly.

    I have already gotten part of the way there by running the "build" command in visual studio for a release build and it creates the Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll in the Temp/bin/Release folder just fine.

    However, when I go to add these newly created dlls from Visual Studio into the Managed folder of the unity-made linux standalone build, the output log is displaying errors regarding "missing the UnityEditor.dll".

    Is there a command line script or other method to run Visual Studio's build command that would create the necessary Assembly dlls but not to reference any code that would be used in the editor? Or just a way to tell Visual Studio "make the Assembly dlls as if I was making a release build from the editor" AKA ignore the "Editor" folder?

    I'm using Unity 2017.4.3.2 and Visual Studio 2017. Thanks!