Closed chriseldredge closed 7 years ago
Hi @chriseldredge could you give more specific steps to repro this?
Add this line to appSettings in App.config:
<add key="example" value="<hello>" />
The problem is the unescaped greater-than in the value, but the root cause exception is hidden by a UriFormatException.
OK thanks, this is a bug in XDT so it may take a bit longer to get this fixed.
I agree the underlying issue may be in XDT, but the exception handling code should check to see if XmlException.Source is non-null/non-blank before attempting to parse it to avoid masking the underlying issue, whatever it may be.
@chriseldredge what exception handling code are you referring to? Is it in SlowCheetah or XDT?
According to the stacktrace, the problem is probably in a catch block in TransformXml.Execute:
System.UriFormatException: Invalid URI: The URI is empty. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri..ctor(String uriString) at SlowCheetah.Tasks.TransformXml.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
@chriseldredge that task is a straight port of XDT. We are releasing XDT with the necessary license for SlowCheetah to redistribute it. See http://nuget.codeplex.com/discussions/405195. Once I do that I will get rid of SlowCheetah.Tasks all together.
I'll keep this open for now so that I do not forget about this but I'll have to look into fixing this after the switch and then try and get it fixed in the XDT version.
Now that I've switched over to the official XDT this may be resolved. We will look before the next release.
With the newest version of XDT (as well as SlowCheetah), this is fixed.
Using SlowCheetah.Tasks 1.0.10727.0, if an XmlException is thrown in TransformXml.Execute, the catch block will try to parse a URI from the exception instance's Source property. When that property is blank, a UriFormatException is thrown.
This bug causes an unhandled exception to be thrown by the task and the finally block incorrectly reports "Transformation succeeded".