Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli support for generating solution for multiple projects #2364

Closed
wants to merge 12 commits into from

Conversation

marwie
Copy link
Contributor

@marwie marwie commented Apr 3, 2021

Link to issue(s) this covers
#2363
#1550

Problem

Commandline interface does not expose a feature to compile multiple assemblies into a solution

Prefix

This PR should be considered as a possible basic solution that I need feedback on to properly fix/implement :)

Solution

I added support to use multiple dll files as InputAssemblyName arg (used like this ilspycmd "lib1.dll lib2.dll" <other arguments>)
And provided with a output solution path as --sln it would call WriteSolutionFile as implemented in #2363

But generally speaking I'm not sure if this is the correct approach to decompile multiple assemblies/projects. For example when decompiling both UnityEditor.dll and UnityEngine.dll to the same output path both projects would contain the same files (as everything is in one directory)

So the problem for that is is that the output path for an assembly must be empty/multiple projects must be output to separate output directories, maybe implicitly generated in the output directory from the dll names?

Alternative ideas

Another idea would be to provide an --sln argument to multiple generated .csproj files which then would invoke the WriteSolutionFile call. But this would require to collect the necessary meta information from previous compiled/the csproj(?)
which currently is string projectFile, string projectPlatform, Guid projectGuid, Guid typeGuid.

Would be interested to hear what you think/prefer and/or if there are better solutions already or in process?! :)

@marwie marwie changed the title Cli/support sln gen Cli/support for generating solution for multiple projects Apr 3, 2021
@marwie marwie changed the title Cli/support for generating solution for multiple projects Cli support for generating solution for multiple projects Apr 3, 2021
siegfriedpammer added a commit that referenced this pull request Apr 15, 2022
@siegfriedpammer
Copy link
Member

05eb2cd implements this feature by migrating your code to ILSpy 8.0.

ilspycmd now accepts multiple assembly file names. If more than one filename and the "-p" option is given, a solution file is automatically generated in the root output directory. For every project a sub-directory is created and the project file and source files are placed within. Sorry for taking so long to get to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants