构建项目后保存时自定义属性错误... [英] Custom property error when save after build project...

查看:65
本文介绍了构建项目后保存时自定义属性错误...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我在Visual Studio 2013(名为TestApp2)中编写了一个带有自定义属性的自定义文本框对象(名为MyTextBox)的Windows窗体项目(名为StartLength) ,来自MyClasses.StartLength类)。


我从PropertyGrid设置StartLength属性值,保存项目和构建项目。然后,我再次更改StartLength属性,任何尝试保存项目都会显示以下错误消息:


属性"StartLength"的代码生成失败。错误是:''StartLengthConverter'无法将'TestApp2.MyClasses.StartLength'转换为'System.ComponentModel.Design.Serialization.InstanceDescriptor'。'


更多细节是in:  https://www.codeproject.com/Questions/1127358/Error-when-I-click-save-all-toolbar-button


如何修复此错误?


解决方案

问题在于您的转换器。您似乎正在尝试转换错误的数据。请发布转换器的代码。


Michael Taylor

http://www.michaeltaylorp3.net


Hi all

I write a windows form project in Visual Studio 2013 (named TestApp2) with a custom text box object (named MyTextBox) with a custom property (named StartLength, from MyClasses.StartLength class).

I set the StartLength property value from PropertyGrid, save project and build project. Then, I change the StartLength property again and any try to save project give this error message:

Code generation for property 'StartLength' failed. Error was: ''StartLengthConverter' is unable to convert 'TestApp2.MyClasses.StartLength' to 'System.ComponentModel.Design.Serialization.InstanceDescriptor'.'

More detail is in: https://www.codeproject.com/Questions/1127358/Error-when-I-click-save-all-toolbar-button

How can I fix this error?

解决方案

The issue is with your converter. It appears you're trying to convert the wrong data. Please post the code for your converter.

Michael Taylor
http://www.michaeltaylorp3.net


这篇关于构建项目后保存时自定义属性错误...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆