Red Gate forums :: View topic - log4net.config not recognized by combined exe
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

log4net.config not recognized by combined exe

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
kualala



Joined: 06 Mar 2013
Posts: 2

PostPosted: Wed Mar 06, 2013 6:50 pm    Post subject: log4net.config not recognized by combined exe Reply with quote

Hi,
I have a .net console application with few dlls, in assemblyInfo.cs i have
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
after using SA to build a combined single .exe, the new .exe assembly seems don't recognize the log4net.config since it does not generate the log file.

is there something i did wrong?
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 181

PostPosted: Fri Mar 08, 2013 12:56 am    Post subject: Reply with quote

Thanks very much for your post. Can I first check--is the log4net.config file copied over to the new directory of the obfuscated exe? I don't believe that SmartAssembly will automatically copy over the log4net.config file.

Should that not be the issue, could you kindly try building the application in SA again but will all options (merging, obfuscation, etc..) turned off? Please let me know if the log file still does not get created in that case.
_________________
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Back to top
View user's profile Send private message
kualala



Joined: 06 Mar 2013
Posts: 2

PostPosted: Wed Mar 13, 2013 7:18 pm    Post subject: Re: Reply with quote

Hi, Jessica:

Of course I copied over the log4net.config myself.

And I did the testing you suggested, and found that without merging the log4net.dll, the output exe can produce the log file.

So I chose to embed the log4net.dll instead of merging, the output exe file
can produce the log file.

so my problem solved.
thank you very much.
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 181

PostPosted: Wed Mar 13, 2013 7:28 pm    Post subject: Reply with quote

Ah okay, glad to hear you've found a solution! Thank you for sharing Smile
_________________
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group