原文地址:https://support.microsoft.com/en-us/kb/963017

  1. Source: Microsoft Support
  2. RAPID PUBLISHING
  3. 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.
  4. Action
  5. You attempt to use a -bit component within the Microsoft Visual Studio Integrated Development Environment (IDE).
  6. Result
  7.  
  8. . When adding control contained within an external -bit assembly to to the Visual Studio Toolbox, you receive the following error message.
  9.  
  10. "<Control Name.dll> is not a valid .NET module".
  11.  
  12. . 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:
  13.  
  14. "Failed to load toolbox item <UserControl Name>. It will be removed from the toolbox."
  15.  
  16. . 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.
  17.  
  18. "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."
  19.  
  20. "The variable <variable name> is either undeclared or was never assigned. "
  21.  
  22. Call Stack:
  23.  
  24. at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
  25. at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
  26. at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
  27. at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
  28. Cause
  29. 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.
  30. Resolution
  31.  
  32. . 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.
  33.  
  34. Advanced Compiler Settings Dialog Box (Visual Basic)
  35. http://msdn.microsoft.com/en-us/library/07bysfz2.aspx
  36.  
  37. /platform (Specify Output Platform) (C# Compiler Options)
  38. http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx
  39.  
  40. 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.
  41.  
  42. . 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.
  43. More Information
  44.  
  45. Is there a -bit version of Visual Studio or Visual Studio ?
  46. http://support.microsoft.com/default.aspx/kb/951801
  47.  
  48. Process Interoperability
  49.  
  50. http://msdn.microsoft.com/en-us/library/aa384231(VS.85).aspx
  51.  
  52. DISCLAIMER
  53. 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.
  54.  
  55. 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.
  56. Properties
  57.  
  58. Article ID: - Last Review: // :: - Revision: 1.1
  59. Applies to
  60.  
  61. Microsoft Visual Studio Express Edition
  62. Microsoft Visual Studio Professional Edition
  63. Microsoft Visual Studio Service Pack
  64. Microsoft Visual Studio Standard Edition
  65. Microsoft Visual Studio Team Edition for Software Developers
  66. Microsoft Visual Studio Team Suite
  67. Microsoft Visual Studio Academic Edition
  68. Microsoft Visual Studio Professional Edition
  69. Microsoft Visual Studio Service Pack
  70. Microsoft Visual Studio Standard Edition
  71. Microsoft Visual Studio Team System Development Edition
  72. Microsoft Visual Studio Team System Team Suite
  73.  
  74. Keywords:
  75.  
  76. kbnomt kbrapidpub KB963017

Cannot add Controls from 64-bit Assemblies to the Toolbox or Use in Designers Within the Visual Studio IDE的更多相关文章

  1. Adding Kentico controls to the Visual Studio toolbox

    https://docs.kentico.com/k10/references/kentico-controls https://docs.kentico.com/k10/references/ken ...

  2. 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 ...

  3. Visual Studio远程调试监视器(MSVSMON.EXE)的32位版本不能用于调试64位进程或64位转储

    在VS2013中调试Silverlight项目时,提示:无法附加.Visual Studio远程调试监视器(MSVSMON.EXE)的32位版本不能用于调试64位进程或64位转储.请改用64位版本. ...

  4. 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 ...

  5. CLR调试报错“Visual Studio远程调试监视器 (MSVSMON.EXE) 的 64 位版本无法调试 32 位进程或 32 位转储。请改用 32 位版本”的解决

    Win7 64位电脑上进行visual studio的数据库项目的CLR存储过程进行调试时,报错: ---------------------------Microsoft Visual Studio ...

  6. 64 位win 7或windows 8下的visual studio不能连接Oracle数据库调试网站的问题

    在64 位win 7或windows 8系统下,visual studio直接F5运行网站调试,你会发现不能连接Oracle数据库,会报一个“ORA-06413: Connection not ope ...

  7. 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下 ...

  8. Visual Studio 2013 新增web项目IIS Express的64位版   转载来源http://www.cnblogs.com/jianyus/p/3524335.html

    使用Visual Studio 2012开发SharePoint的应该都遇到过下面的错误“SharePoint 在32位进程中不受支持”,而怎么修改目标平台都不好使,因为VS 2012所配备的IIS ...

  9. (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 ...

随机推荐

  1. C#如何防止程序多次运行的技巧

    一.使用互斥量Mutex弄懂了主要的实现思路之后,下面看代码实现就完全不是问题了,使用互斥量的实现就是第四点的思路的体现,我们用为该程序进程创建一个互斥量Mutex对象变量,当运行该程序时,该程序进程 ...

  2. samsung bios configuration怎么设置U盘启动

    1.用第三方U盘制作软件制作U盘启动盘,并下载正版系统镜像或纯净版镜像,下载后缀为ISO的镜像文件拷贝到U盘根目录.2.开机按F2键进入BIOS设置.选择BOOT选项—Secure Boot设置为“D ...

  3. ionic+angularjs开发hybrid App(环境配置+创建测试项目)

    本文使用的系统是win10 因为后期需要使用nodejs 所以先把node装好 https://nodejs.org/download/ 下载JDK并配置Java运行环境 http://www.ora ...

  4. UEditor独立图片、文件上传模块

    百度的UEditor编辑器的强大之处不用多说,但是有时候我们只想用他的文件.图片上传模块,不想把这个编辑器加载出来,话不多说,直接上实现代码: 引用文件: <script src="~ ...

  5. Codeforces 2016 ACM Amman Collegiate Programming Contest A. Coins(动态规划/01背包变形)

    传送门 Description Hasan and Bahosain want to buy a new video game, they want to share the expenses. Ha ...

  6. 面试web前端开发,被打击了

    今天我去面试web前端开发,被打击了,也跟我也有一定的关系,最基础的东西我都没回答好,哎! 主要是我在等我有意向的公司给我发offer,闲着没事,刚好又有公司叫我去面试,我抱着多面一家也没有啥子坏处就 ...

  7. 创建16x16二级hash目录

    Hash目录是一种优化文件存储性能的方法.无论是Windows还是Linux,无论是NTFS还是ext4,每个目录下所能容纳的项目数是有限的.并不是不能保存,而是当项目数量过大的时候,会降低文件索引速 ...

  8. 再次认识ASP.NET MVC

    MVC, V,就是View.视图 M,只应该是ViewModel.视图模型 C,Controller.控制器 我们需要怎么看待并使用这三者. 从你敲入url,我们可以做为入口. 当你敲入url并按了回 ...

  9. Bootstrap学习------按钮

    Bootstrap为我们提供了按钮组的样式,博主写了几个简单的例子,以后也许用的到. 效果如下 代码如下 <!DOCTYPE html> <html> <head> ...

  10. seajs源码分析

    seajs主要做了2件事 1.定义什么是模块,如何声明模块:id.deps.factory.exports ----define=function(id,deps,factory){return ex ...