ILRepack.Lib.MSBuild.Task
ILRepack.Lib.MSBuild.Task copied to clipboard
PrimaryAssemblyFile only added on Release Builds
The PrimaryAssemblyFile seems to be added only on Release Builds via a relative path. ..\..\[...]\UIControls.dll
Debug Log
INFO: IL Repack - Version 2.0.18
VERBOSE: Runtime: ILRepack.Lib.MSBuild.Task, Version=2.0.18.2, Culture=neutral, PublicKeyToken=f7072046361f3979
INFO: ------------- IL Repack Arguments -------------
/out:D:\[...]\merged\UIControls.dll D:\[...]UIControls.dll D:\[...]\de\UIControls.resources.dll
-----------------------------------------------
INFO: Adding assembly for merge: D:\[...]\UIControls.dll
INFO: Adding assembly for merge: D:\[...]\UIControls.resources.dll
Release Log
INFO: IL Repack - Version 2.0.18
VERBOSE: Runtime: ILRepack.Lib.MSBuild.Task, Version=2.0.18.2, Culture=neutral, PublicKeyToken=f7072046361f3979
INFO: ------------- IL Repack Arguments -------------
/out:D:\[...]\merged\UIControls.dll ..\..\[...]\UIControls.dll D:\[...]UIControls.dll D:\[...]\de\UIControls.resources.dll
-----------------------------------------------
INFO: Adding assembly for merge: ..\..\[...]\UIControls.dll
INFO: Adding assembly for merge: D:\[...]\UIControls.dll
INFO: Adding assembly for merge: D:\[...]\de\UIControls.resources.dll
[...]
ERROR: Duplicate type UIControls.ControlA
The target is identical for both configurations. When I remove the first InputAssembly it's content is missing on Debug builds.
*csproj
<Target Name="ILRepacker" AfterTargets="Build">
<ItemGroup>
<InputAssemblies Include="$(TargetDir)$(AssemblyName).dll" />
<InputAssemblies Include="$(TargetDir)de\$(AssemblyName).resources.dll" />
</ItemGroup>
<ILRepack Parallel="true" DebugInfo="true" InputAssemblies="@(InputAssemblies)" TargetKind="SameAsPrimaryAssembly" OutputFile="$(TargetDir)\merged\$(AssemblyName).dll" Verbose="true" LogFile="$(TargetDir)log.txt" />
</Target>