VB.NET : CodeDomProvider Compilation & XML Multiline Strings

shadow711

New Member
See: http://stackoverflow.com/a/1674434/194031I can't seem to get this syntax to work when using compilation via \[code\]CodeDomProvider\[/code\]code.vb contains something like:\[code\]Dim s As String = <a><![CDATA[HelloWorld & Space]]></a>.Value\[/code\]other code that compiles this code uses this:\[code\]var p = CodeDomProvider.CreateProvider("VisualBasic");p.CompileAssemblyFromFile(<options>, "code.vb") //Error \[/code\]It fails with compilation errors. If I remove the XML multiline text trick from the file I'm trying to compile it works.Is this XML syntax just some Visual Studio "sugar" that only works in the IDE?I'm including all these references when I compile (some are for other purposes):\[code\]SystemSystem.DataSystem.Data.SqlClientSystem.DrawingSystem.IOSystem.NetSystem.Text.RegularExpressionsSystem.WebSystem.Windows.FormsSystem.Xml\[/code\]I can compile VB multiline XML strings in VS 2010 without any problem.
 
Back
Top