Closed mr-j0nes closed 8 months ago
Hello
Please check how you have added projects references to the nlog.IndentException
.
You have use package reference for each project where nlog.IndentException
is used.
But as soon as nlog.IndentException
should not be used from any project directly the first step I would like to ask you to do is
Remove all nlog.IndentException
(as package or dll) references from all projects (except the main project in solution).
The idea is to copy if newer nlog.IndentException
to the binary folder.
Please check property page for nlog.IndentException
reference in the main project and adjust Copy to output directory
with copy always
value.
Thank you for the reply.
I have done as you suggested but I still get the error "Error loading extensions: nlog.IndentException"
Here the properties of my main project (including the new changes):
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="NLog.IndentException" Version="0.1.9" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ApiWrapper\ApiWrapper.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
It took some time for me to get back to the package.
Please check sample
folder.
No .dll
is created within the package.
The package contains .pp files compiled into the assembly when NLog.IndentException
package is referenced.
please use your project assembly name within add assembly
extension configuration.
<extensions>
<add assembly="nlog.identtest"/>
</extensions>
Thank you very much. Now I could make it work. I wasn't realizing that the name of the assembly was the one where the nlog.IndentException package was compiled into. After I changed this it worked.
Well, Test project has the nlog.IndentException
assembly name in the
nlog.config actually. This may cause misunderstanding.
I'v put a sample
project already but I have a plan to add a few words
about how it works in the readme a little bit later.
On Tue, Jan 9, 2024 at 6:42 PM mr-j0nes @.***> wrote:
Thank you very much. Now I could make it work. I wasn't realizing that the name of the assembly was the one where the nlog.IndentException package was compiled into. After I changed this it worked.
— Reply to this email directly, view it on GitHub https://github.com/oleksabor/nlog.indentexception/issues/3#issuecomment-1883401276, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3QIWYJ6FLPEY6DIXAPCS3YNVXPTAVCNFSM6AAAAABBLBKZBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTGQYDCMRXGY . You are receiving this because you modified the open/close state.Message ID: @.***>
Hi,
this is not actually and issue but a crying for help.
I am new to .NET and I do not seem to understand how to make this library work. I have installed nlog and nlog.indentexception as NuGet packages in one of the projects (I have multiple projects) within my solution. I have installed these on the main project and used nlog as reference in the other projects.
In the nlog.config I have added following snippet from your example:
Then when running my program I get following exception in the nlog internal log file:
As I understand the
assembly="nlog.IndentException"
bit searches for a dll called that way? I do not seem to find any dll with that name in the build folder (I do find an nlog.dll though)The versions I used are: NLog (5.2.8) NLog.IndentException (0.1.9)
Thanks in advance.