“System.Int32”类型的对象无法转换为“System.Int16”类型。 0 0

编程入门 行业动态 更新时间:2024-10-27 14:20:45
本文介绍了“System.Int32”类型的对象无法转换为“System.Int16”类型。 0 0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好 我有一个错误的Visual Studio 2012问题(类型为''System.Int32''的对象无法转换为类型''System.Int16'') /> 我的类lib在VS 2010中使用框架4.0创建,它在VS 2010中运行良好,但是当我安装Vs 2012 framWork 4.5时,我有一条错误消息(类型为''System.Int32'的对象)当我打开表单设计时,'无法转换为''System.Int16'')。 谢谢

Hi all I have a problem with Visual studio 2012 with an error (Object of type ''System.Int32'' cannot be converted to type ''System.Int16'') My class lib Button was create in VS 2010 with framework 4.0, It work fine in VS 2010, but when I installed Vs 2012 framWork 4.5, I have an error message (Object of type ''System.Int32'' cannot be converted to type ''System.Int16'') when I open the Form design. thank you

推荐答案

按照提供的细节,我的猜测是,在不同框架中编写的应用程序试图通过一些不同的框架进行调整,而不允许它进行适当的转换。 不确定它是否真的有帮助,但只需进行快速测试并按照以下步骤查看它是否能解决您的问题: 1)转到菜单,项目 - > < project name =>属性 2)转到应用程序选项卡 3)查找目标框架 4)将其设置为Framework 4.0(预计安装VS2012后为4.5) 5)将显示一个弹出窗口,提示您重新启动项目,允许它。 希望它有所帮助! As per the provided details, my guess is that the application that is written in a different framework is trying to be adjustable with some different framework WITHOUT allowing it to do a proper conversion. Not sure if it really helps, but just give a quick test and follow the below steps and see if it resolves your issue: 1) Goto menu, Project-> <project name=""> Properties 2) Goto "Application" Tab 3) Find "Target Framework" 4) Set it to Framework 4.0 (it is expected to be 4.5, after your installation of VS2012) 5) A popup will be shown which will prompt you about a restart of the Project, allow it. Hope it helps!

更多推荐

“System.Int32”类型的对象无法转换为“System.Int16”类型。 0 0

本文发布于:2023-05-31 12:02:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/391384.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:类型   转换为   对象   System

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!