-
Notifications
You must be signed in to change notification settings - Fork 218
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
Support for remapping references #234
Comments
Or perhaps more simply than generic reference rewriting: |
Did you ever find a workaround or tool to make this happen? This would be incredibly useful. I've not managed to find any simple solution short of manually hacking things up or building a tool to do same. |
Note that ILRepack creates/updates a resource in the merged assembly It still requires that the original (non-test) assembly was created with ILRepack, as ILMerge doesn't maintain that metadata. |
It is possible to avert problem by generating type forwarding assemblies in place of merged ones https://learn.microsoft.com/en-us/dotnet/standard/assembly/type-forwarding But is big chunk of work to implement this feature, I'm not sure some one will make PR for it. |
I've got a bunch of assemblies
{A1.dll, A2.dll, A3.dll...}
and corresponding test assemblies{A1.Tests.dll, A2.Tests.dll, A3.Tests.dll...}
I'm merging the main assemblies together into a singleA.dll
for distribution, and now I'd like to merge all the tests together as well intoA.Tests.dll
to distribute alongside it.However, because the all of the Tests.dll assemblies were originally built prior to stuff being merged, the resulting A.Tests.dll assembly still references all the pre-merged {A1.dll, A2.dll, A3.dll, ...} assemblies. This is no good...
I could recompile the A1.Tests.dll... dlls from scratch with different references, but it's not great to redo all that compilation work just to change a reference. I could also write a custom tool using Cecil to edit the references, but that again seems inefficient considering that ILRepack is already doing most of that work.
So I'm wondering about having some kind of
/remapRef:from:to
or/remapRefsFile:file
command-line parameter, which my build code could use to specify for each of the A1.dll, "remap this to the merged A.dll".What do you think?
The text was updated successfully, but these errors were encountered: