Use Log4net in Navisworks plugin

Use Log4net in Navisworks plugin

Anonymous
Not applicable
1,191 Views
3 Replies
Message 1 of 4

Use Log4net in Navisworks plugin

Anonymous
Not applicable

Hi,

 

I use log4net as my logging tool in other applications and would like to use it inside my Navisworks plugin. However it seems Navisworks is not able to find my log4net.config file (it crashes on startup, and when running a debugger it is due to it not finding my log4net.config file). I have tried copying the config file to both plugin folder and root folder with no success..

 

Does anyone have any experience with the use log4net or other equivalent logging tools in Navisworks plugins, and would like to share some experiences or example code?

 

Kind Regards

Kristoffer

0 Likes
Accepted solutions (1)
1,192 Views
3 Replies
Replies (3)
Message 2 of 4

ulski1
Collaborator
Collaborator
Accepted solution
Hej Kristoffer,
Have you copied the 3rd party dll + config to the Dependencies folder ?
Br
Ulrik
Message 3 of 4

Anonymous
Not applicable

Okay, that worked!

 

It appears it was only the log4net.dll that was missing. Apparently my log4net.config file can reside within the plugin folder.

 

Originally I used Costura Fody to include all my dependencies within the dll itself (or that is atleast what I thought I did).

 

Any chance this might work using Costura Fody? Ideally I would like to only have to copy files to the Plugins folder.

 

If you believe this is not the possible, I will accept your answer!

0 Likes
Message 4 of 4

ulski1
Collaborator
Collaborator
Hi,
Sorry, I haven't tested the Costura project.
Br
Ulrik
0 Likes