hvanbakel / CsprojToVs2017

Tooling for converting pre 2017 project to the new Visual Studio 2017 format.
MIT License
1.08k stars 120 forks source link

System.Xml.XmlException: System does not support 'Windows-1252' encoding #309

Open MRatnam opened 1 year ago

MRatnam commented 1 year ago

Hi I attempted to execute the migration on our solution and this exception was thrown:

12:23:47 ERR] Project Solution.sln parsing has thrown an exception, skipping... System.Xml.XmlException: System does not support 'Windows-1252' encoding. Line 1, position 31. ---> System.ArgumentException: 'Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name') at int System.Text.EncodingTable.InternalGetCodePageFromName(string name) at int System.Text.EncodingTable.GetCodePageFromName(string name) at Encoding System.Text.Encoding.GetEncoding(string name) at Encoding System.Xml.XmlTextReaderImpl.CheckEncoding(string newEncodingName) --- End of inner exception stack trace --- at void System.Xml.XmlTextReaderImpl.Throw(Exception e) at void System.Xml.XmlTextReaderImpl.Throw(string res, string[] args, Exception innerException) at Encoding System.Xml.XmlTextReaderImpl.CheckEncoding(string newEncodingName) at bool System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(bool isTextDecl) at bool System.Xml.XmlTextReaderImpl.Read() at XDocument System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at XDocument System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options) at Project Project2015To2017.Reading.ProjectReader.Read(FileInfo projectFile) in C:/projects/csprojtovs2017/Project2015To2017.Core/Reading/ProjectReader.cs:line 50 at Project Project2015To2017.ProjectConverter.ProcessProjectFile(FileInfo file, Solution solution, ProjectReference reference) in C:/projects/csprojtovs2017/Project2015To2017.Core/ProjectConverter.cs:line 69 at IEnumerable Project2015To2017.ProjectConverter.ProcessSolutionFile(Solution solution)+MoveNext() in C:/projects/csprojtovs2017/Project2015To2017.Core/ProjectConverter.cs:line 58 at bool System.Linq.Enumerable+WhereEnumerableIterator.MoveNext() at void System.Collections.Generic.List.InsertRange(int index, IEnumerable collection) at (IReadOnlyCollection projects, IReadOnlyCollection solutions) Project2015To2017.MigrationFacility.ParseProjects(IEnumerable items, ITransformationSet transformationSet, ConversionOptions conversionOptions)+ProcessSingleItem(FileInfo file, string extension) in C:/projects/csprojtovs2017/Project2015To2017/MigrationFacility.cs:line 155 [12:23:47 INF] No projects have been found to match your criteria.