Serious trouble with ILMerge and .NET 4.0

前端 未结 5 628
误落风尘
误落风尘 2020-12-28 22:41

For the life of me, I can\'t seem to get my .NET 4 application merging properly with ILMerge. Even after setting /targetplatform, /lib, /ndebug and adding a custom

5条回答
  •  北海茫月
    2020-12-28 23:06

    While it is true that ILMerge does not update WPF resource strings, it can be used to merge assemblies with WPF references by passing the reference assembly directory instead of the runtime directory to /targetplatform, as such: /targetplatform:v4,"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client" (for the .NET 4.0 client profile).

    I use this to merge in Rx's System.Reactive.dll, which has a reference to Dispatcher, but doesn't have any actual WPF resources.

提交回复
热议问题