Membru care solicită informaţii
You can get exceptions that point to a xaml file, with error messages such as:
AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 42 Position: 288]
Would it be a good idea if Ctrl-G (ie goto) allowed the format 42:288 so the cursor would be positioned at the right column?
Paul Cotter19 mai 2011 18:57
Could be useful although generally you don't know exactly which column you'd want to find. In most cases if you get an error line in the Output or Error windows then you can just double click and it'll jump automatically. You can actually generate your own debug messages in the correct format and it'll work in the Output window. So I'm not sure how generally useful goto column would be.
Michael Taylor - 5/20/2011
http://msmvps.com/blogs/p3net20 mai 2011 15:18
I would agree with you normally, but the XamlParser is also a runtime thing that throws exceptions such as...
'Set property 'System.Windows.UIElement.Effect' threw an exception.' Line number '18' and line position '153'.
At this point double-clicking will just highlight part of the error message :).
Paul Cotter24 mai 2011 13:44
This error mostly occurs due to following:
1. Version Change in assemly while you are working in the same code (i.e. you used version x initially and later on you changed it to version x + y ). Some Assemblies in 3rd party control when upgraded do not support few older properties or methods.
2. Your XAML code is referring to some event which is not present in the code behind file. Make sure that all XAML code has relevant code in code behind file. (Remove any unnecessary Events from XAML and CS files)
3. Your XAML code has repeated the same code again, causing a clash.
Hope this helps
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
26 mai 2011 03:32
Well, first of all you have to go to line 18 (you can Ctrl+G and enter in your line number, or you can just scroll down until you see 18 if you have the line numbers showing on the left-hand side of the IDE (Visual Studio) when you are editing source code)
You will see at the bottom of Visual Studio in the status bar, you will see "Col" and the number beside it is the column. (there is also "Ch", and that works too)
Hope this helps!
P.S. This answer will work in VS 2010 for sure, so if you are using an earlier version of Visual Studio, it might be different. Let me know.
- Nevin Janzen (The accomplished and complete programmer who will stop at nothing and will never give up. Well, at least that's the way it should be.6 ianuarie 2012 16:32