This expection occures when trying to develop a WPF UserControl that contains resources (perhaps it happens not just with UserControls...)
The full exception:
System.NotSupportedException: TypeConverter cannot convert from System.String.
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text)
at ICSharpCode.WpfDesign.XamlDom.XamlTextValue.GetValueFor(XamlPropertyInfo targetProperty)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.ParseObjectAttribute(XamlObject obj, XmlAttribute attribute)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.ParseObject(XmlElement element)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.ParseValue(XmlNode childNode)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.ParseObjectChildElementAsPropertyElement(XamlObject obj, XmlElement element, XamlPropertyInfo defaultProperty, Object defaultPropertyValue)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.ParseObject(XmlElement element)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.Parse(XmlDocument document, XamlParserSettings settings)
at ICSharpCode.WpfDesign.XamlDom.XamlParser.Parse(XmlReader reader, XamlParserSettings settings)
at ICSharpCode.WpfDesign.Designer.Xaml.XamlDesignContext..ctor(XmlReader xamlReader, XamlLoadSettings loadSettings)
at ICSharpCode.WpfDesign.Designer.DesignSurface.LoadDesigner(XmlReader xamlReader, XamlLoadSettings loadSettings)
at ICSharpCode.WpfDesign.AddIn.WpfViewContent.LoadInternal(OpenedFile file, Stream stream)
at ICSharpCode.SharpDevelop.Gui.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)
How to reproduce:
Write a user control, have it contain a <UserControl.Resources> tag with some styles and templates. Open in it design view.
Note that this does not affect the correctness of the code/xaml, which compiles and runs flawlessly.
Itai.