Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Custom Tools: Toolbox issues with Fx2 and Fx4 Custom Controls

$
0
0

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


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>