BUG: Project references are regenerated when you add a reference to an ActiveX control from Visual Studio .NET (820643)
The information in this article applies to:
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
SYMPTOMS When you add a reference in Visual Studio .NET to a common
language runtime proxy for the Component Object Model (COM) types that are
present in an ActiveX Control type library, and then you add a reference to the
corresponding ActiveX control, you notice that the common language runtime
proxy is regenerated and then added as a new project reference. For example, if
you already have a project reference to SHDocVw.dll, and the reference is named
SHDocVw, a common language runtime proxy that is named Interop.SHDocVw.dll is
created and then added as a project reference that is named SHDocVw1. You
notice the same behavior when you add the previously mentioned ActiveX control
from the Toolbox to a Form or to a user control.
Additionally, when
you add a reference to a Windows Forms proxy for an ActiveX control, and then
you add the ActiveX control from the Toolbox to a Form or to a user control,
you notice that the Windows Forms proxy is regenerated and then added as a new
project reference. For example, if you already have a project reference to
AxSHDocVw.dll, and the reference is named AxSHDocVw, a Windows Forms proxy that
is named AxInterop.SHDocVw.dll is created and then added as a project reference
that is named AxSHDocVw1.CAUSE You add a reference in Visual Studio .NET to a common
language runtime proxy or to a Windows Forms proxy. Then, you add a reference
to the corresponding ActiveX control or add the ActiveX control from the
Toolbox to a Form or to a user control. However, the corresponding project
references already exist. The problem then occurs because Visual Studio .NET
does not recognize the existing project references. Visual Studio .NET tries
incorrectly to regenerate and to add these project references. This causes the
behavior that is described in the "Symptoms" section.
Note You do not notice this behavior if you have a project reference
to a common language runtime proxy or to a Windows Forms proxy that is created
when you add a reference to an ActiveX control or when you add an ActiveX
control from the Toolbox to a Form or to a user control. Such proxy files
typically have file names such as Interop.SHDocVw.dll and
AxInterop.SHDocVw.dll. You may also create proxies by using the .NET Framework
tools such as Type Library Importer (Tlbimp.exe) and Windows Forms ActiveX
Control Importer (Aximp.exe). Proxies that are created by the previously
mentioned tools have file names such as SHDocVw.dll and
AxSHDocVw.dll.STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 2/3/2006 |
---|
Keywords: | kbvs2005doesnotapply kbvs2005swept kbvs2002sp1sweep kbinterop kbCommandLine kbide kbCmnDlg kbMiscTools kbDeployment kbConfig kbCtrl kbControl kbForms kbWindowsForms kbbug KB820643 kbAudDeveloper |
---|
|