-
Notifications
You must be signed in to change notification settings - Fork 33
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
Problem with duplicate Types #21
Comments
You can try providing ILRepack.targets similar to the following one in your projects folder. <!-- ILRepack -->
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge1.dll" />
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge2.dll" />
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge3.dll" />
</ItemGroup>
<ILRepack
Parallel="true"
Internalize="true"
InputAssemblies="@(InputAssemblies)"
TargetKind="Dll"
OutputFile="$(OutputPath)\$(AssemblyName).dll"
AllowedDuplicateNamespaces="System.Collections.Generic.*"
/>
</Target>
</Project>
<!-- /ILRepack --> |
Thank you for your answer. |
Yes, You have to provide targets file to use AllowedDuplicateNamespaces option which should work similarly to /allowDup. You can use something like the following if you don't want to write every dll into the targets file. <!-- ILRepack -->
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)$(TargetName)$(TargetExt)"/>
<InputAssemblies Include="$(OutputPath)*.dll" Exclude="$(OutputPath)$(TargetName)$(TargetExt)"/>
</ItemGroup>
<ILRepack
Parallel="true"
DebugInfo="true"
AllowDuplicateResources="false"
InputAssemblies="@(InputAssemblies)"
TargetKind="SameAsPrimaryAssembly"
AllowedDuplicateNamespaces="System.Collections.Generic.*"
OutputFile="$(OutputPath)$(TargetName)$(TargetExt)"
/>
</Target>
</Project>
<!-- /ILRepack --> |
Thanks again. That looks good. I will try this. |
My build fails without any Error Message in the output. |
Try providing a LogFile option. It should show up in the log. |
Or you can use MSBuild Log Viewer. |
When using the TaskScheduler package (https://github.com/dahall/taskscheduler) in a project and using ILRepack to merge all assemblies, I get the following error:
error : Duplicate type System.Collections.Generic.EventedList`1 from GroupControls.dll, was also present in AeroWizard, Version=2.2.3.0, Culture=neutral, PublicKeyToken=915e74f5d64b8f37
Obviously, the same type is present in two repedent packages. How can I configure ILRepack to handle this problem?
The text was updated successfully, but these errors were encountered: