Я пытаюсь сериализовать «PrinterSettings», используя этот код:
Private Sub pAddEditPrinterSettings(ByVal uPrinterSettings As PrinterSettings)
Dim s As String = String.Empty
Dim nXSer As New Xml.Serialization.XmlSerializer(uPrinterSettings.GetType())
Using sw As New StringWriter
nXSer.Serialize(sw, uPrinterSettings)
s = sw.ToString()
End Using
Однако строка «nXSer As New ...» завершается с ошибкой
BindingFailure: The assembly with the name "System.Drawing.XmlSerializers" wasn't found in the LoadFrom binding contexts of AppDomain with ID 1. Cause: System.IO.FileNotFoundException: The file or assembly "SystemDrawing.XmlSerializers, Version=4.0.0.0,Culture=neutral,PublicKeyToken b03f5f7f11d50a3a or a dependency wasn't found. The system couldn't find the file.
Что я могу здесь делать не так?
Спасибо.