1

Closed

Patch to testform and you need to add the ICSharpCode dll as a reference to the rtest project for it to run

description

I have replaced "Environment.GetEnvironmentVariable("temp");" with "Path.GetTempPath();" in the code.
 
You were also right about the missing reference to ICSharpCode.TextEditor.dll. I have set "Cope Local = True" for ICSharpCode.TextEditor.dll in the VisualizerMain project to fix that problem :)
 
Regarding the replacement of "string test" to "const string test" then it's on purpose that it's not a const. The visualizer reacts differently based on if the string is a const or not. If you wish to test program with the "Inject Xml back" feature then it should not be a const.
 
I have uploaded the changes to SVN and they will be included in the next build.
 
Thank you very much for your corrections :)
 
Best Regards
 
Lars
 
 
I assume you have that DLL GACed on your system, allowing it to run. on your system.
 

Index: TestForm.cs

--- TestForm.cs (revision 8050)
+++ TestForm.cs (working copy)
@@ -19,14 +19,14 @@
private static void CreateXsltTestDoc()
{
const string xsltDoc = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"/\"><html><body><h2>My CD Collection</h2><table border=\"1\"><tr bgcolor=\"#9acd32\"><th align=\"left\">Title</th><th align=\"left\">Artist</th></tr><xsl:for-each select=\"catalog/cd\"><tr><td><xsl:value-of select=\"title\" /></td><td><xsl:value-of select=\"artist\" /></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>";
  • string tmpDir = Environment.GetEnvironmentVariable("temp");
  • string tmpDir = Path.GetTempPath();
    string xsltFile = string.Format(@"{0}\test.xslt", tmpDir);
    File.WriteAllText(xsltFile, xsltDoc);
    }
    private void TestForm_Load(object sender, EventArgs e)
    {
  • string test = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><catalog><cd country=\"USA\"><title>Empire Burlesque</title><artist>Bob Dylan</artist><price>10.90</price></cd><cd country=\"UK\"><title>Hide your heart</title><artist>Bonnie Tyler</artist><price>10.0</price></cd><cd country=\"USA\"><title>Greatest Hits</title><artist>Dolly Parton</artist><price>9.90</price></cd></catalog>";
  • const string test = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><catalog><cd country=\"USA\"><title>Empire Burlesque</title><artist>Bob Dylan</artist><price>10.90</price></cd><cd country=\"UK\"><title>Hide your heart</title><artist>Bonnie Tyler</artist><price>10.0</price></cd><cd country=\"USA\"><title>Greatest Hits</title><artist>Dolly Parton</artist><price>9.90</price></cd></catalog>";
    Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost host = new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost(test, typeof(XmlVisualizer.Visualizer));
    host.ShowVisualizer();
Closed Nov 24, 2008 at 7:52 AM by larshove

comments