-
Notifications
You must be signed in to change notification settings - Fork 220
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
Merging assemblies with a reference to Autofac #58
Comments
Looks like a known problem Mono.Cecil jbevain/cecil#152 |
@damianh Yes, I think that's a known problem. The possible fix is to modify |
Unfortunately this still doesn't work. Just try to merge a .NET 4.5 assembly with Autofac and the same problem with |
Problem still there with ILRepack 1.26 |
Strange, there's now a passing test that round trips Autofac net45 assembly (with no error). |
Yes, just merge a DLL that references Autofac and then try to merge that one in another .DLL that also references Autofac, preferably a different version. |
This also happens without Autofac. It seems to be a problem with Assemblies from .net 4.5. I have a simple application that references System.Core and several Azure Management assemblies. |
If someone can provide the simplest project or assembly that causes this when merged, I can have a look. |
I am trying to merge a libraries from zip archive OS X 10.10.3 |
- add the fwk folder as a search directory, to avoid relying on current execution fwk (as Cecil does) - will work for mono (supposedly) if one provides the fwk path in the arguments (/targetframework:v4,/path/to/mono/fwk)
specify the path of your dll in the command line |
I am trying to ILMerge a project containing Autofac.dll and that fails on that dependency.
The command I am using is:
ILRepack.exe /out:Merged.exe ILRepackTest.exe Autofac.dll
Expected outcome
To have ILRepackTest.exe and Autofac.dll to be merged to Merged.exe
Observed output is the following exception:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.ModuleDefinition.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at ILRepacking.ReferenceFixator.FixReferences(Collection`1 attributes)
at ILRepacking.ReferenceFixator.FixReferences(MethodDefinition meth)
at ILRepacking.ReferenceFixator.FixReferences(TypeDefinition type)
at ILRepacking.ILRepack.Repack()
at ILRepacking.ILRepack.Main(String[] args)
Note
My understanding is this is because Autofac is created as a portable class library. See https://github.com/autofac/Autofac/wiki/Frequently-Asked-Questions
The text was updated successfully, but these errors were encountered: