Closed tmoonlight closed 2 months ago
related to #147 related to #142 maybe solved by #166
@tmoonlight can you check whether #166 fixes your problem? Just remove the .zip extension from log4net.3.0.0-preview.2a.nupkg.zip
In case it doesn't fix your problem, can you please create a tiny project reproducing the error? The best would be a net8.0 application which only depends on log4net.
I have followed your method, but the issue with the PublishTrimmed program still persists.
Hi, The issue seems to be more complex than initially thought. I found that not only is log4net affected, but other parts of the code also encounter problems when trimming. For example, embedded strings and resources in my project are no longer accessible. I will try downgrading my .NET Core version and attempt packaging again. Thank you for your support:)
No problem - as you can see in #142 and #147 you are not the only one with those problems using aot. Feel free to reopen when you get new details.
The problem still exists on 3.0.1
@hhxdestiny nobody said otherwise. In case you have a sample application which reproduces the problem, feel free to reopen (or create a new issue).
Hi,
I am using log4net in my project running on .NET 8. When I enable the “PublishTrimmed” setting in my project file (< PublishTrimmed >true< /PublishTrimmed >), I consistently receive the following errors during the configuration of log4net:
This issue persists even when I configure log4net purely through code, without using a log4net.config file. The problem does not occur in non-trimmed mode or older versions of the trimming mode (such as .NET Core 3.0).
To assist in diagnosing this issue, I have attached a file containing my program that can reliably reproduce the problem: https://github.com/tmoonlight/NSmartProxy/releases/download/v1.4.0/nspclient_scd_win_x86_v1.4.0.zip