Skip to content

Commit

Permalink
Added a fix for Issue DynamoDS#70:
Browse files Browse the repository at this point in the history
"RevitTestFramework fails to Run If an Addin manifest is encoded in UTF-16. When run from the console using RevitTestFrameworkConsole.exe, the error message is "There is no Unicode byte order mark. Cannot switch to Unicode." There is no error message shown in the GUI."
  • Loading branch information
spitznagelk authored and spitznagelk committed Apr 27, 2017
1 parent aa20e8d commit 77467f9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Framework/Runner/AddinHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ static class AddinHelpers
public static void FullyQualifyAddinPaths (FileInfo copiedAddinFile, FileInfo originalAddin)
{
XmlDocument doc = new XmlDocument();
doc.Load(copiedAddinFile.FullName);
using (StreamReader streamReader = new StreamReader(copiedAddinFile.FullName, true))
{
doc.Load(streamReader);
}

foreach(XmlElement addinElement in doc.DocumentElement.ChildNodes)
foreach (XmlElement addinElement in doc.DocumentElement.ChildNodes)
{
//if this element is an addin attempt to make the assembly path a full path
if (addinElement.LocalName != "AddIn")
Expand Down

0 comments on commit 77467f9

Please sign in to comment.