Cannot add Controls from 64-bit Assemblies to the Toolbox or Use in Designers Within the Visual Studio IDE
原文地址:https://support.microsoft.com/en-us/kb/963017
Source: Microsoft Support
RAPID PUBLISHING
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
Action
You attempt to use a -bit component within the Microsoft Visual Studio Integrated Development Environment (IDE).
Result . When adding control contained within an external -bit assembly to to the Visual Studio Toolbox, you receive the following error message. "<Control Name.dll> is not a valid .NET module". . When dragging and dropping a UserControl defined in a -bit assembly to a Form in another project within the same solution, you receive the error: "Failed to load toolbox item <UserControl Name>. It will be removed from the toolbox." . When opening the Visual Studio Windows Form Designer for a form that attempts to instantiate a control in a -bit assembly, you receive the following errors in the Windows Form designer. "Could not find type <typename>. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built." "The variable <variable name> is either undeclared or was never assigned. " Call Stack: at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Cause
This behavior is by design. Visual Studio is a -bit process, and therefore can only execute -bit modules. While Visual Studio allows you to add a reference to a -bit assembly, it cannot actually JIT compile it to -bit and execute it in process.
Resolution . Rebuild the assembly using the "AnyCPU" setting. This would allow the component to run within a -bit process (such as Visual Studio), or in a -bit process. Advanced Compiler Settings Dialog Box (Visual Basic)
http://msdn.microsoft.com/en-us/library/07bysfz2.aspx /platform (Specify Output Platform) (C# Compiler Options)
http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx If you are using a third party component and cannot rebuild it yourself, contact the component vendor to see if an "AnyCPU" version of the assembly is possible to obtain. This will allow the component to Just-In-Time (JIT) compile to run as either a -bit or -bit module, depending on the machine architecture the operating system and host process are targeting. . Add the assembly as a reference and load the control dynamically at run-time. Although you still would be unable to use the control within any designer inside Visual Studio, you can still write the code needed to instantiate the control and set it's properties accordingly.
More Information Is there a -bit version of Visual Studio or Visual Studio ?
http://support.microsoft.com/default.aspx/kb/951801 Process Interoperability http://msdn.microsoft.com/en-us/library/aa384231(VS.85).aspx DISCLAIMER
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Properties Article ID: - Last Review: // :: - Revision: 1.1
Applies to Microsoft Visual Studio Express Edition
Microsoft Visual Studio Professional Edition
Microsoft Visual Studio Service Pack
Microsoft Visual Studio Standard Edition
Microsoft Visual Studio Team Edition for Software Developers
Microsoft Visual Studio Team Suite
Microsoft Visual Studio Academic Edition
Microsoft Visual Studio Professional Edition
Microsoft Visual Studio Service Pack
Microsoft Visual Studio Standard Edition
Microsoft Visual Studio Team System Development Edition
Microsoft Visual Studio Team System Team Suite Keywords: kbnomt kbrapidpub KB963017
Cannot add Controls from 64-bit Assemblies to the Toolbox or Use in Designers Within the Visual Studio IDE的更多相关文章
- Adding Kentico controls to the Visual Studio toolbox
https://docs.kentico.com/k10/references/kentico-controls https://docs.kentico.com/k10/references/ken ...
- Add File as a Link on Visual Studio
https://stackoverflow.com/questions/18963750/add-file-as-a-link-on-visual-studio-debug-vs-publish Ev ...
- Visual Studio远程调试监视器(MSVSMON.EXE)的32位版本不能用于调试64位进程或64位转储
在VS2013中调试Silverlight项目时,提示:无法附加.Visual Studio远程调试监视器(MSVSMON.EXE)的32位版本不能用于调试64位进程或64位转储.请改用64位版本. ...
- Visual Studio发布Web项目报错:Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The specified file could not be encrypted.
背景 Visual Studio下的Web项目 现象 发布时遇到Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The ...
- CLR调试报错“Visual Studio远程调试监视器 (MSVSMON.EXE) 的 64 位版本无法调试 32 位进程或 32 位转储。请改用 32 位版本”的解决
Win7 64位电脑上进行visual studio的数据库项目的CLR存储过程进行调试时,报错: ---------------------------Microsoft Visual Studio ...
- 64 位win 7或windows 8下的visual studio不能连接Oracle数据库调试网站的问题
在64 位win 7或windows 8系统下,visual studio直接F5运行网站调试,你会发现不能连接Oracle数据库,会报一个“ORA-06413: Connection not ope ...
- Win7 64 安装Visual Studio 2010和SQL Server 2008 R2
1. 在MSDN,我告诉你下载安装文件,VS 2010 不论32位还是64位都是同一个文件,cn_visual_studio_2010_ultimate_x86_dvd_532347.iso.SQL下 ...
- Visual Studio 2013 新增web项目IIS Express的64位版 转载来源http://www.cnblogs.com/jianyus/p/3524335.html
使用Visual Studio 2012开发SharePoint的应该都遇到过下面的错误“SharePoint 在32位进程中不受支持”,而怎么修改目标平台都不好使,因为VS 2012所配备的IIS ...
- (win10 64位系统中)Visual Studio 2015+OpenCV 3.3.0环境搭建,100%成功
(win10 64位系统中)Visual Studio 2015+OpenCV 3.3.0环境搭建,100%成功 1.下载opencv 官网http://opencv.org/下载windows版Op ...
随机推荐
- C#如何防止程序多次运行的技巧
一.使用互斥量Mutex弄懂了主要的实现思路之后,下面看代码实现就完全不是问题了,使用互斥量的实现就是第四点的思路的体现,我们用为该程序进程创建一个互斥量Mutex对象变量,当运行该程序时,该程序进程 ...
- javascript 中断函数的使用 setInterval()——返回顶部
方法名称:gotop() 功能描述:点击某个元素,调用方法gotop(),固定间隔,滚动至屏幕顶部 日期 :2016.06.06 16:02 author :cyh2009@live.com < ...
- RGW/SWIFT对象存储性能测试工具--COSBench安装
Cosbench是Intel的开源云存储性能测试软件,COSBench目前已经广泛使用与云存储测试,并作为云存储的基准测试工具使用 https://github.com/intel-cloud/cos ...
- bzoj3343
3343: 教主的魔法 Time Limit: 10 Sec Memory Limit: 256 MBSubmit: 1178 Solved: 527[Submit][Status][Discus ...
- offsetHeight, clientHeight与scrollHeight的区别
在网上搜了一下,结论非常笼统,讲IE从不讲版本,因此自己做了测试并上传结论.以下结论皆是在标准模式下测试通过的,没有测试quirk模式. clientHeight 大部分浏览器对 clientHe ...
- mui popover 自定义 弹出位置 显示 隐藏
mui popover 一.要显示.隐藏弹出菜单插件,mui推荐使用锚点方式. 1.页面顶部导航栏.底部工具栏固定位置 <header class="mui-bar mui-bar-n ...
- BZOJ1572 工作安排 USACO2009
描述 Description Farmer John 有太多的工作要做啊!!!!!!!!为了让农场高效运转,他必须靠他的工作赚钱,每项工作花一个单位时间.他的工作日从0时刻开始,有100000 ...
- pyspider爬豆瓣电影实例
直接copy官网实例会出现599的错误,百度了很久发现是因为证书的问题 添加这一句忽略证书 validate_cert = False 代码如下: ++++++++++++++++++++++++++ ...
- 求1...n中因子最多的数
Problem 求[1..N]中素因子数最多且最小的数n,N充分大. Solution 将任意自然数n (n>2) 分解 n=p1^k1 * p2^k2 * p3^k3 * ... * Pm^k ...
- Linux 下Nginx编译安装
Untitled .note-content {font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsof ...