2

I was trying to debug some XSLT in Visual Studio based off of this MSDN article I found: https://msdn.microsoft.com/en-us/library/ms255602.aspx.

As soon as I tried to run it, I got this error:

VerificationException

Operation could destabilize the runtime.

I've seen other StackOverflow questions for this error, but none that address it happening from debugging XSLT. Any ideas of how to get around it?

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
  • Best method is to comment out most of the code and then start adding in pieces until you find the error. The xml serialization error message are vague and I've found that commenting out is best way of finding root cause. – jdweng Dec 14 '17 at 17:34
  • It seems to not like the * in these pieces ``. – Developer Guy Dec 14 '17 at 18:21
  • Where did you get the asterisk from? Asterisk usually in a schema means more than one item and it the innertext and not against an attribute. – jdweng Dec 14 '17 at 18:46
  • @Justin R, Do you mean that you have found the real reason for it? Is it related to the asterisk?https://stackoverflow.com/questions/12071402/difference-between-and-node-in-xslt, maybe you could test it using the same sample from the MSDN document, or you could share your sample in your issue, of course, if it was resolved, you could share your solution as an answer. – Jack Zhai Dec 15 '17 at 07:27
  • 1
    The syntax `` (with a wildcard to match any namespace prefix) is only supported in XSLT 2.0 and above. If you are debugging in Visual Studio you are almost certainly using an XSLT 1.0 processor. Having said that, I would have expected a more meaningful error message in this case. – Tim C Dec 15 '17 at 09:05
  • @TimC The transform I am working with is XSLT 2.0. Does that mean that Visual Studio doesn't offer support for debugging XSLT 2.0? – Developer Guy Dec 15 '17 at 13:34
  • I believe that is the case. Microsoft has no love for XSLT 2.0 and their own XSLT processor (which I assume VS is using) is XSLT 1.0 only. – Tim C Dec 15 '17 at 13:47
  • Good to know. Surprised Microsoft doesn't make an effort to offer support for it considering it's been around for a while. – Developer Guy Dec 15 '17 at 13:53
  • 1
    Thanks for Tim C's assistance.@Justin R, It really has limitations for XSLT 2.0: https://stackoverflow.com/questions/34596042/xsl-v-2-wont-work-in-visual-studio-2013 – Jack Zhai Dec 18 '17 at 01:37
  • @Justin R, If this issue has been resolved, you could share your solution as an answer, and then mark it. If not, please feel free to share the latest issue. – Jack Zhai Dec 19 '17 at 03:03

0 Answers0