Comments (4)
Just one thing, the program does not write into the existing RichTextBox but creates a new one.
I read it can be related to the declaration of the logger but i do declarate him after the InitilizeComponent.
Actually it's related to initialization of the logging configuration, and it may happen earlier. For example if you create other loggers.
To solve this, call NLog.Windows.Forms.RichTextBoxTarget.ReInitializeAllTextboxes(this)
after InitilizeComponent()
and before logging anything to this target. This would tell configuration to search for new controls in this form.
from nlog.windows.forms.
Thanks a lot
All is working
Clément Huart
from nlog.windows.forms.
The warning is not a harmful one, it just says that Nlog.xsd has no info on RichTextBox, which is really true.
This by itself should not cause any problems to you. What are the problems you are experiencing? Also, you have internal logging set to log internal warnings to nlog-internal.log
which is nice. Could you please check if this file contains anything?
from nlog.windows.forms.
I restarted with a blank projet from zero and this time it works. No explanation...
Just one thing, the program does not write into the existing RichTextBox but creates a new one.
I read it can be related to the declaration of the logger but i do declarate him after the InitilizeComponent.
from nlog.windows.forms.
Related Issues (20)
- net6.0-windows
- Support Layoutable properties HOT 3
- Fix default layout comments
- Breaking changes version 5
- Change AssemblyVersion to 5.0.0.0
- Using Only NLog.config for RichTextBox Does Not Log HOT 3
- Add net6.0-windows since LTS
- Continuous Build not running on merge to master HOT 1
- NullReferenceException in RichTextBoxTarget SendTheMessageToRichTextBox
- NLog.LogManager.Configuration reload causes RichTextBoxTarget to create a new form HOT 6
- Question: Is it possible to write to winforms ListView? HOT 2
- Form hanging when RichTextBox target nonstop logging HOT 6
- Symbols package publishing failed. HOT 1
- System.NullReferenceException calling ReInitializeAllTextboxes() HOT 5
- Missing source package on NuGet HOT 4
- RichTextBoxTarget - An exception occurred under NET48 HOT 3
- Create a nuget package with net5.0-windows platform supporting HOT 3
- No RowColor for RichTextBoxTarget when LeftToRight.Yes set HOT 3
- When to support net6.0 platform? HOT 2
- PublishSingleFile causes Target symbol-name is unknown: 'RichTextBox' HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nlog.windows.forms.