gluck / il-repack

Open-source alternative to ILMerge
Apache License 2.0
1.18k stars 217 forks source link

Xaml source not from primary or reference assembly #271

Closed droppedcode closed 10 months ago

droppedcode commented 4 years ago

If there are 3 assemblies: Primary, Reference, Source the TryPatchPath would not patch the path and a wrong would be generated as relative path (eg. /Referencepack://...)

Primary: content does not matter Source: contains a ResourceDictionary (ex. Resources/Test.xaml) which we want to add to Reference Reference: contains a xaml with code like this:

Without fix it would create: <ResourceDictionary Source="/Reference/Source;component/Resources/Test.xaml" />

With fix it create: <ResourceDictionary Source="/Primary;component/Source/Resources/Test.xaml" />

See attached example application with arguments: args.txt ILRepackSourceFix.zip