- Home /
AssemblyInfo or alternative - How to add version number
I would like to add several properties to the executable of my project. The properties I would like to add are: version number, trademark, copyright and guid. Can I add an AssemblyInfo anywhere in the project? There is no special Properties directory as in normal Visual Studio projects.
Answer by Ray-Pendergraph · Oct 13, 2010 at 05:09 PM
The problem with your concept is that Unity actually builds several DLLs for your project based on the compile phases. If you look in the Library\ScriptAssemblies folder under your project you can see what I am talking about. Secondly, I quickly tried to add an AssemblyInfo to the root of a couple of those phase folders defined in the link but I did not notice that that information got assembled into the DLL. Maybe they ignore them? That's an internal Unity thing. I may have just missed something maybe you could play around with sticking the AssemblyInfo in certain folders and see what happens. I have built AssemblyInfo into DLLs before with prebuild DLLs for libraries in Unity and they showed up in Red Gate right away (for those DLLs).
Thanks for the comment. I only need properties on the main .exe that is created. I don't care much about any of the other dlls in the data directory.
Exactly, but I guess what I mean is that your only hope (unless you can insert that stuff to the exe post build) is that Unity would take it from one of those DLLs when it was building the exe. Other than that it's pretty much a black box unless there are some build pipeline tricks. If someone from Unity is reading, are there any custom build script tricks to insert this?
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
different project for different platforms 0 Answers
Unity (2017.3.0f3) won't start 1 Answer
Unity project building stuck, need help. 1 Answer
How do I choose the Android SDK version for Unity Cloud Build? 0 Answers