自定义工具:Fx2和Fx4自定义控件的工具箱问题 [英] Custom Tools: Toolbox issues with Fx2 and Fx4 Custom Controls

查看:60
本文介绍了自定义工具:Fx2和Fx4自定义控件的工具箱问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2012

Windows 7& 8

VB.NET& C#

这会影响我们安装产品的计算机.

我们为Visual Studio开发了一种语言插件,支持使用.NET Frameworks 2.0-4.0进行开发.我们目前正在使用的产品适用于Visual Studio 2012.我们有 更新了我们的 安装,将自定义控件添加到新标签"MyControls"在Visual Studio工具箱中,但是遇到了一些麻烦.我们正在使用注册表 下面的键/值将它们添加到工具箱中.

HKLM \ Software \ Microsoft \ .NETFramework \ v4.0.30319 \ AssemblyFoldersEx \ Fx4控件

(默认):Fx4自定义控件库的安装路径.包含Windows窗体和Web控件库.

HKLM \ Software \ Microsoft \ .NETFramework \ v4.0.30319 \ AssemblyFoldersEx \ Fx4 Controls \ Toolbox

TabName:MyControls

HKLM \ Software \ Microsoft \ .NETFramework \ v2.0.50727 \ AssemblyFoldersEx \ Fx2表单控件

(默认):Fx2自定义Windows表单控件库的安装路径.

HKLM \ Software \ Microsoft \ .NETFramework \ v2.0.50727 \ AssemblyFoldersEx \ Fx2 Form Controls \ Toolbox

TabName:MyControls

HKLM \ Software \ Microsoft \ .NETFramework \ v2.0.50727 \ AssemblyFoldersEx \ Fx2 Web控件

(默认):Fx2自定义Web控件库的安装路径

HKLM \ Software \ Microsoft \ .NETFramework \ v2.0.50727 \ AssemblyFoldersEx \ Fx2 Web控件\工具箱

TabName:MyControls

每个路径都指定了不同的位置.对于某些控件,我们有Framework 2.0版本和Framework 4.0版本.

Framework 2.0开发

对于所有Framework 2.0 Windows项目或网站,控件仅列出一次;但是,将鼠标悬停在它们上面时,工具提示是Framework 4.0控件的提示.

在创建Framework 2.0 Windows Forms项目时,控件可以正常工作.

在创建Framework 2.0网站时,控件仅列出一次,但引用了Framework 4.0控件.  将控件添加到设计器后,会弹出警告,提示 程序集"mycontrolsassembly.dll"或其d之一所需的.NET Framework版本. 高于项目目标.NET Framework版本.您是否要 转换为 仍然将此引用添加到您的项目中吗?"  选择是"将添加带有4.0引用的控件,并且无法编译.

Framework 4.0开发

在创建Windows Forms项目或网站时,所有控件都在具有2.0版本的计算机上重复和4.0框架支持已安装.

如果不存在.NET 2.0 Framework,则不会安装我们的2.0控件,并且工具箱功能正确地只显示一次控件.

问题:

Framework 2.0 Windows项目和网站:我们可以强制将工具提示设为框架的提示吗? 2.0控件?

Framework 2.0网站:如何强制工具箱引用2.0程序集而不是4.0 ?

所有Framework 4.0项目和网站:如何限制工具箱仅显示一次控件?

谢谢,

马特

解决方案

马特,

感谢您在MSDN论坛中发帖.
 
我将请一些专家来解决这个问题,看看他们是否可以为您提供帮助.可能会有一些时间延迟,感谢您的耐心配合.
 
感谢您的理解和支持.
 
最好的问候,


Visual Studio 2012

Windows 7 & 8

VB.NET & C#

This affects the machine our products are installed on.

We develop a language add-in for Visual Studio that supports development using .NET Frameworks 2.0-4.0.  The product we are currently working on is for Visual Studio 2012.  We have updated our installation to add our custom controls to a new tab, "MyControls," in the Visual Studio toolbox, but are having some trouble.  We are using the registry keys/values below to add them to the toolbox.

HKLM\Software\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Fx4 Controls

(default): Installed Path to Fx4 custom controls library.  Contains both Windows Form and Web Control libraries.

HKLM\Software\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Fx4 Controls\Toolbox

TabName: MyControls

HKLM\Software\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\Fx2 Form Controls

(default): Installed Path to Fx2 custom Windows forms controls library.

HKLM\Software\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\Fx2 Form Controls\Toolbox

TabName: MyControls

HKLM\Software\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\Fx2 Web Controls

(default): Installed Path to Fx2 custom Web controls library

HKLM\Software\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\Fx2 Web Controls\Toolbox

TabName: MyControls

Each of the paths specify different locations.  There are controls for which we have a Framework 2.0 version and a Framework 4.0 version.

Framework 2.0 Development

For all Framework 2.0 Windows Projects or Websites, the controls are listed just once; however, when hovering over them, the tool tip is that of our Framework 4.0 controls.

When creating a Framework 2.0 Windows Forms project, the controls work correctly.

When creating a Framework 2.0 Web Site, controls are listed once, but reference the Framework 4.0 controls.  When a control is added to the designer, a warning pops up that states "The .NET Framework version required by assembly 'mycontrolsassembly.dll' or one of its dependencies is higher than the project target .NET Framework version.  Do you want to add this reference to your project anyway?"  Selecting 'Yes' will add the control, with the 4.0 reference and fail to compile.

Framework 4.0 Development

When creating a Windows Forms project or Web Site, all controls are duplicated on machines that have both 2.0 and 4.0 framework support installed.

If the .NET 2.0 Framework is not present, our 2.0 controls are not installed and the toolbox functions correctly only showing the controls once.

Questions:

Framework 2.0 Windows Projects and Web Sites: Can we force the tool tip to be that of our Framework 2.0 controls?

Framework 2.0 Web Site: How can we force the toolbox to reference the 2.0 assembly rather than the 4.0?

All Framework 4.0 projects and web sites: How can we restrict the toolbox to only display controls once?

Thank you,

Matt

解决方案

Hi Matt,

Thank you for posting in the MSDN Forum.
 
I will involve some experts into this issue to see whether they can help you out. There might be some time delay, appreciate for your patience.
 
Thank you for your understanding and support.
 
Best regards,


这篇关于自定义工具:Fx2和Fx4自定义控件的工具箱问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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