diff --git a/Project2015To2017.Migrate2017.Library/Transforms/FileTransformation.cs b/Project2015To2017.Migrate2017.Library/Transforms/FileTransformation.cs
index 135f46e..cc59f08 100644
--- a/Project2015To2017.Migrate2017.Library/Transforms/FileTransformation.cs
+++ b/Project2015To2017.Migrate2017.Library/Transforms/FileTransformation.cs
@@ -34,6 +34,7 @@ public sealed class FileTransformation : ILegacyOnlyProjectTransformation
"Reference",
"ProjectReference",
"PackageReference",
+ "Protobuf",
"COMReference",
"Antlr4",
"Antlr3"
diff --git a/Project2015To2017.Tests/FileTransformationTest.cs b/Project2015To2017.Tests/FileTransformationTest.cs
index 90627aa..a57d546 100644
--- a/Project2015To2017.Tests/FileTransformationTest.cs
+++ b/Project2015To2017.Tests/FileTransformationTest.cs
@@ -144,5 +144,29 @@ public void TransformsFilesPreserveCOMReferences()
Assert.AreEqual((comReferencesBefore[0] as XElement).Value, (comReferencesAfter[0] as XElement).Value);
Assert.AreEqual((comReferencesBefore[1] as XElement).Value, (comReferencesAfter[1] as XElement).Value);
}
+
+ [TestMethod]
+ public void TransformsFilesPreserveProtobuf()
+ {
+ var project = new ProjectReader().Read(Path.Combine("TestFiles", "FileInclusion", "projectWithProtobuf.testcsproj"));
+ project.CodeFileExtension = "cs";
+ var transformation = new FileTransformation();
+
+ var protobufBefore = project.ProjectDocument.Root.DescendantNodes().
+ Where(node => node.NodeType == System.Xml.XmlNodeType.Element).
+ Where(node => (node as XElement).Name.LocalName.Equals("Protobuf")).ToList();
+
+ Assert.AreEqual(2, protobufBefore.Count);
+
+ transformation.Transform(project);
+
+ var protobufAfter = project.ProjectDocument.Root.DescendantNodes().
+ Where(node => node.NodeType == System.Xml.XmlNodeType.Element).
+ Where(node => (node as XElement).Name.LocalName.Equals("Protobuf")).ToList();
+
+ Assert.AreEqual(2, protobufAfter.Count);
+ Assert.AreEqual((protobufBefore[0] as XElement).Value, (protobufAfter[0] as XElement).Value);
+ Assert.AreEqual((protobufBefore[1] as XElement).Value, (protobufAfter[1] as XElement).Value);
+ }
}
}
\ No newline at end of file
diff --git a/Project2015To2017.Tests/Project2015To2017.Tests.csproj b/Project2015To2017.Tests/Project2015To2017.Tests.csproj
index 198d1ad..77d03b3 100644
--- a/Project2015To2017.Tests/Project2015To2017.Tests.csproj
+++ b/Project2015To2017.Tests/Project2015To2017.Tests.csproj
@@ -80,6 +80,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
diff --git a/Project2015To2017.Tests/TestFiles/FileInclusion/projectWithProtobuf.testcsproj b/Project2015To2017.Tests/TestFiles/FileInclusion/projectWithProtobuf.testcsproj
new file mode 100644
index 0000000..f2f6cae
--- /dev/null
+++ b/Project2015To2017.Tests/TestFiles/FileInclusion/projectWithProtobuf.testcsproj
@@ -0,0 +1,79 @@
+
+
+
+ Debug
+ x86
+
+ v4.7.2
+ 2.0
+ {215B1102-3351-4C2B-BCC3-198013BBDB66}
+ WindowsForms
+ Project1
+ WinExe
+ Project1.Form1
+ 1
+ 0
+ 0
+ Project1
+
+
+ True
+ True
+ True
+ bin\
+ DEBUG;TRACE;Win32,Project1
+ x86
+
+
+
+ False
+ False
+ True
+ bin\
+ TRACE;Win32,Project1
+ x86
+
+
+
+
+
+
+
+
+
+
+ {F852374C-22BA-4CB6-AA34-DA1A589B9D8D}
+ UpgradeHelpers.Gui
+
+
+
+
+ MSDATASRC
+
+
+
+
+
+
+ Form1.cs
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+ Preview
+
+
+
+
+
\ No newline at end of file