Closed black-empower closed 1 year ago
Looks like these transitive dependencies do not end up in the same type/assembly. Can you post a sample to reproduce this?
Looks like System.ExceptionArgument
does not meet the criteria of an embedded shared type:
https://github.com/tom-englert/FodyTools/blob/9dbbf10a7353d7df732158c6fce572a2a80d1462/FodyTools/CodeImporter.cs#L1268
Where does this come from?
So currently it seems like it is connected with referencing Autofac and creating a Lifetimescope and creating at least one element from the IoC. I attached a small project which reproduces the issue. TestLinking.zip
System.ExceptionArgument
is an internal enum that's present in various system assemblies (e.g. System.Memory
, System.Private.CoreLib
e.a.). It has different values in each assembly, so it's not possible to merge them.
Anyhow it's not a good idea to merge system assemblies, you should exclude them.
If you want a single file exe, use the dot net single file assembly feature.
Problem is, we don't want a single file executable, but create a nuget package with internalized dependencies so the dependency hell nuget generates is not there.
With parts of dotnet framework embedded?????
You don't need to embed netstandard, that should be available always
ok, maybe there is some problem with the understanding how this works. Does it take all the assemblies under Assemblies or only the dlls copied to the output directory. I tried it befire with ILRepack and it worked with everything in the output directory, but sadly it was not dotnet6 compatible.
All direct and transient references from the output directory; for netcore/netstandard this includes a lot of system assemblies.
Hi, is there a way to handle duplicate namespaces. Currently the weaving generates an error, if multiple dependencies use the same transitive dependency or the main assembly also uses the same dependency.
Best regards