-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOException when ParserSettings loaded in WPF App #409
Comments
Same problem here. Your solution seems good to me! |
@LordPinhead |
Same issue in 2.5.0:
|
Can you post a simple demo application to repro your issue. |
I couldn't repro your issue , and my wpf demo application is working fine. |
I'm not able to reproduce it in a minimal example project. It works fine for me also. The real project is far from "minimal": https://github.com/uoinfusion/Infusion/blob/e88086438a78eb7d388b5122e9ceb9cc535210fe/Infusion.Desktop/CommandLine/Handler.cs#L15 |
When i am back at work, i will make a sample projekt, should be online by the end of the week. |
You Need to deactivate "Options -> Debugging -> Just my code" or the Exception will never be printed in Visual Studio. The Exception will still occure, but hidden. |
I tried the next unit test for range of values 0-20 of MaximumDisplayWidth
An Exception is fired:
The following line is the start of the cause of error
The I think this module of wrapping lines need heavily debugging and correction to avoid the negative value This revision and correction need co-operation with us to resolve this issue and submit PR. |
@LordPinhead |
Sorry, had a little stress the last week. Have a look https://github.com/LordPinhead/CommandLineWPFTestApp , just deactivate the "debug own code only" option. |
Thanks @LordPinhead for the Demo.
The limits in using your solution Is that
Also, Console.WindowWidth can cause other Exceptions like The try ..catch clause stop the propagation of
What is you suggestion? |
If Console.IsOutputRedirected is 4.5 and up, we could use preprocessor ifs. ´´´ ´´´ So we could route depending on the framework used |
I think you can just remove the test on NET40. Most WPF app nowadays will target NET45. The goal here is just to suppress an exception. I doubt we can achhieve it without that function. |
Whats the status? Should it be cut off from Net40 or not? At some point, there will be no systems using the old framework and i think it's time to send Net40 into his retirement. |
The exception is handled by This issue will be fixed in the next release. |
When i use the Library in my WPF App (not Console App), there will be thrown an IOException in the Constructor of ParserSettings. It will be catched and DefaultMaximumHeight will be set.
But it would, in my opinion, cleaner with that code:
If you agree, i could do a pull request and merge it.
Best regards
Lord_Pinhead
The text was updated successfully, but these errors were encountered: