NightmareXIV / ECommons

A library for Dalamud
MIT License
34 stars 40 forks source link

[Bug?] Can't load plugin in `Debug` build. #40

Closed ArchiDog1998 closed 3 months ago

ArchiDog1998 commented 3 months ago

Hi, when I load the plugin, I found it will fail if I build it in Debug mode in dev plugin mode.

image

If I comment on this line, My plugin could be loaded successfully. I don't know why. If this line is unnecessary, Shall we remove that?

https://github.com/NightmareXIV/ECommons/blob/b81f6c6381f2eed903bb8915c1a7d2acdb117275/ECommons/ECommonsMain.cs#L53

Limiana commented 3 months ago

Hello! You probably have your own serilog nuget package/private library included, which interferes with Dalamud's built-in one. This line is to ensure that verbose logs are being processed by Dalamud. Since everything is fine in release mode, please check your csproj file for errors and also check that your debug folder does not include serilog.dll (if you need help, please send .csproj file)

ArchiDog1998 commented 3 months ago

Oh, thanks for your reply! Yeah, it works perfectly in the release mode. After adding the code <PrivateAssets>all</PrivateAssets> to my reference at your suggestion, it was fixed in the Debug mode! Thanks a lot!