Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
developer
active.documents
automation
binary.file_format
clipboard.dde
com.add_ins
hosting.controls
internet_other
office.sdks
officedev
officedev.other
outlook.forms
outlook.vba
smarttags
vba
web.components
  
 
date: Tue, 1 Jul 2008 17:07:07 -0700,    group: microsoft.public.office.developer.com.add_ins        back       


RE: log4net from my AddIn   
Hi,

I'm using log4net with vsto3.0 word and excel addins /wo any problems.

in app.config I use the regular <log4net>...</log4net> stuff and:
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler" 
/>



in the addin project's AssemblyInfo.cs

// Configure log4net using the .config file 
[assembly: log4net.Config.XmlConfigurator(Watch = true)]


Hope this helps,
Rai
"David Thielen" wrote:

> Hi;
> 
> I've looked at the log4net docs and it appears that it must be in 
> winword.exe.config for log4net. It looks in the app.config file.
> 
> -- 
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
> 
> 
> 
> ""Peter Huang" [MSFT]" wrote:
> 
> > Hi David,
> > 
> > For the question, I mean not use Winword.exe.config, we can use our own 
> > config file. It can be a XML file and located in the addin directory. 
> > Because .NET have strongly support for XML, and provided many XML class to 
> > manipulate the XML file.
> > 
> > Also another reason is that, Winword.exe.config is for Winword.exe but we 
> > may have many other Word related application, so to store all the 
> > information in winword.exe.config may cause confliction. Because another 
> > Word Application development may overwrite the existing setting.
> > 
> > If you still have any concern, please feel free to post here.
> > 
> > Best regards,
> > 
> > Peter Huang
> > 
> > Microsoft Online Community Support
> > ==================================================
> > When responding to posts, please "Reply to Group" via your newsreader so 
> > that others may learn and benefit from your issue. 
> > ==================================================
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > 
> >
date: Tue, 1 Jul 2008 17:07:07 -0700   author:   raidevnet

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us