Skip to content

Commit 82c32fd

Browse files
authored
Merge pull request #1785 from gewarren/gewarren-add-reference
Fix add reference topics
2 parents f0b1e42 + d840b95 commit 82c32fd

File tree

2 files changed

+37
-45
lines changed

2 files changed

+37
-45
lines changed

docs/ide/how-to-add-or-remove-references-by-using-the-reference-manager.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
---
2-
title: "How to: Add or Remove References By Using the Reference Manager | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "01/18/2018"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-general"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
2+
title: Add References in the Reference Manager
3+
ms.date: 04/11/2018
4+
ms.technology: vs-ide-general
5+
ms.topic: conceptual
116
f1_keywords:
127
- "VS.ReferenceManager"
138
helpviewer_keywords:
@@ -24,11 +19,11 @@ helpviewer_keywords:
2419
- "referencing components, assemblies not listed"
2520
author: "gewarren"
2621
ms.author: "gewarren"
27-
manager: ghogen
22+
manager: douge
2823
ms.workload:
2924
- "multiple"
3025
---
31-
# How to: add or remove references by using the Reference Manager
26+
# How to: Add or remove references by using the Reference Manager
3227

3328
You can use the **Reference Manager** dialog box to add and manage references to components that you, Microsoft, or another company developed. If you're developing a Universal Windows app, your project automatically references all of the correct Windows SDK DLLs. If you are developing a .NET application, your project automatically references mscorlib.dll. Some .NET APIs are exposed in components that you have to add manually. References to COM components or custom components have to be added manually.
3429

@@ -46,16 +41,16 @@ The **Reference Manager** dialog box shows different categories on the left side
4641

4742
- Browse, with the Recent subgroup.
4843

49-
## Adding and removing a reference
44+
## Add and remove a reference
5045

5146
### To add a reference
5247

53-
1. In **Solution Explorer**, right-click on the References node and choose **Add Reference**.
54-
55-
2. Specify the references to add, and then choose the **OK** button.
48+
1. In **Solution Explorer**, right-click on the **References** or **Dependencies** node and choose **Add Reference**. You can also right-click on the project node and select **Add** > **Reference**.
5649

5750
**Reference Manager** opens and lists the available references by group.
5851

52+
2. Specify the references to add, and then select **OK**.
53+
5954
## Assemblies tab
6055

6156
The **Assemblies** tab lists all .NET Framework assemblies that are available for referencing. The **Assemblies** tab doesn't list any assemblies from the global assembly cache (GAC) because assemblies in the GAC are part of the run-time environment. If you deploy or copy an application that contains a reference to an assembly that's registered in the GAC, the assembly won't be deployed or copied with the application, regardless of the Copy Local setting. For more information, see [Managing references in a project](../ide/managing-references-in-a-project.md).
@@ -134,15 +129,9 @@ Some components in the list may not be shown, depending on the .NET Framework ve
134129

135130
Open the **Add Reference** dialog box again. The assemblies should appear on the **.NET** tab. If they do not, make sure that the assemblies are located in the specified *AssemblyLocation* directory, restart Visual Studio, and try again.
136131

137-
## COM tab
138-
139-
The COM tab lists all COM components that are available for referencing. If you want to add a reference to a registered COM DLL that contains an internal manifest, unregister the DLL first. Otherwise, Visual Studio adds the assembly reference as an ActiveX Control instead of as a native DLL.
140-
141-
If a project type doesn't support COM, the tab won't appear in the **Reference Manager** dialog box.
132+
## Projects tab
142133

143-
## Solution tab
144-
145-
The Solution tab lists all compatible projects within the current solution, in the Projects sub-tab.
134+
The **Projects** tab lists all compatible projects within the current solution, in the **Solution** sub-tab.
146135

147136
A project can reference another project that targets a different version of the .NET Framework. For example, you could create a project that targets the [!INCLUDE[net_v40_short](../code-quality/includes/net_v40_short_md.md)] but that references an assembly that's been built for the .NET Framework 2. However, the .NET Framework 2 project can't reference a [!INCLUDE[net_v40_short](../code-quality/includes/net_v40_short_md.md)] project. For more information, see [Multi-targeting overview](../ide/visual-studio-multi-targeting-overview.md).
148137

@@ -191,6 +180,12 @@ An SDK is a collection of files that Visual Studio treats as a single component.
191180
192181
If a project type doesn't support **Extensions**, the tab doesn't appear in the **Reference Manager** dialog box.
193182

183+
## COM tab
184+
185+
The COM tab lists all COM components that are available for referencing. If you want to add a reference to a registered COM DLL that contains an internal manifest, unregister the DLL first. Otherwise, Visual Studio adds the assembly reference as an ActiveX Control instead of as a native DLL.
186+
187+
If a project type doesn't support COM, the tab doesn't appear in the **Reference Manager** dialog box.
188+
194189
## Browse button
195190

196191
You can use the **Browse** button to browse for a component in the file system.
@@ -226,4 +221,4 @@ The search bar in the **Reference Manager** dialog box operates over the tab tha
226221

227222
## See also
228223

229-
[Managing references in a project](../ide/managing-references-in-a-project.md)
224+
- [Manage references in a project](../ide/managing-references-in-a-project.md)

docs/ide/managing-references-in-a-project.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
---
2-
title: "Managing references in a project | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "10/26/2017"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-general"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
2+
title: Managing references in a project
3+
ms.date: 04/11/2018
4+
ms.technology: vs-ide-general
5+
ms.topic: conceptual
116
f1_keywords:
127
- "vs.ProjectPropertiesReferencePaths"
138
- "cs.ProjectPropertiesReferencePaths"
@@ -24,19 +19,19 @@ helpviewer_keywords:
2419
- "objects [Visual Studio], referencing"
2520
author: "gewarren"
2621
ms.author: "gewarren"
27-
manager: ghogen
22+
manager: douge
2823
ms.workload:
2924
- "multiple"
3025
---
31-
# Managing references in a project
26+
# Manage references in a project
3227

3328
Before you write code against an external component or connected service, your project must first contain a reference to it. A reference is essentially an entry in a project file that contains the information that Visual Studio needs to locate the component or the service.
3429

35-
To add a reference, right click on the References node in Solution Explorer and choose **Add Reference**. For more information, see [How to: Add or Remove References By Using the Reference Manager](../ide/how-to-add-or-remove-references-by-using-the-reference-manager.md).
30+
To add a reference, right click on the **References** or **Dependencies** node in **Solution Explorer** and choose **Add Reference**. You can also right-click on the project node and select **Add** > **Reference**. For more information, see [How to: Add or Remove References](../ide/how-to-add-or-remove-references-by-using-the-reference-manager.md).
3631

37-
![Add a reference in Visual C++](../ide/media/vs2015_cpp_add_reference.png "vs2015_cpp_add_reference")
32+
![Add a reference in Visual C++](../ide/media/vs2015_cpp_add_reference.png)
3833

39-
You can make a reference to the following types of components and services:
34+
You can add a reference to the following types of components and services:
4035

4136
- .NET Framework class libraries or assemblies
4237

@@ -76,11 +71,11 @@ If you determine that the Extension SDK being referenced by your app is not supp
7671

7772
1. Restart Visual Studio and open your app.
7873

79-
1. Right-click on the **References** node in the project that caused the error and choose **Add Reference**.
74+
1. Right-click on the **References** or **Dependencies** node in the project that caused the error and choose **Add Reference**.
8075

8176
1. Click the **Windows** tab and then the **Extensions** sub-tab, then uncheck the checkboxes for the old Extension SDKs, and check the checkboxes for the new Extension SDKs. Click **OK**.
8277

83-
## Adding a reference at design time
78+
## Add a reference at design time
8479

8580
When you make a reference to an assembly in your project, Visual Studio searches for the assembly in the following locations:
8681

@@ -89,7 +84,9 @@ When you make a reference to an assembly in your project, Visual Studio searches
8984
- Other project directories in the same solution. (You can find these assemblies on the **Projects** tab.)
9085

9186
> [!NOTE]
92-
> All projects contain an implied reference to mscorlib. Visual Basic projects contain an implied reference to `Microsoft.VisualBasic`. All projects contain an implied reference to `System.Core`, even if `System.Core` is removed from the list of references.
87+
> - All projects contain an implied reference to mscorlib.
88+
> - All projects contain an implied reference to `System.Core`, even if `System.Core` is removed from the list of references.
89+
> - Visual Basic projects contain an implied reference to `Microsoft.VisualBasic`.
9390
9491
## References to shared components at run time
9592

@@ -99,9 +96,9 @@ If you deploy an application that contains a reference to a custom component tha
9996

10097
By default, the <xref:Microsoft.VisualStudio.VCProjectEngine.VCProjectReference.CopyLocal%2A> property is set to **False** if the assembly or component is in the global assembly cache or is a framework component. Otherwise, the value is set to **True**. Project-to-project references are always set to **True**.
10198

102-
## Referencing a project or assembly that targets a different version of the .NET Framework
99+
## Reference a project or assembly that targets a different version of the .NET Framework
103100

104-
You can create applications that reference projects or assemblies that target a different version of the .NET Framework. For example, you could create an application that targets the [!INCLUDE[net_client_v40_long](../deployment/includes/net_client_v40_long_md.md)], that references an assembly that targets [!INCLUDE[dnprdnext](../ide/includes/dnprdnext_md.md)]. If you create a project that targets an earlier version of the [!INCLUDE[dnprdnshort](../code-quality/includes/dnprdnshort_md.md)], you cannot set a reference in that project to a project or assembly that targets a newer version.
101+
You can create applications that reference projects or assemblies that target a different version of the .NET Framework. For example, you could create an application that targets .NET Framework 4.6, that references an assembly that targets .NET Framework 4.5. If you create a project that targets an earlier version of the .NET Framework, you cannot set a reference in that project to a project or assembly that targets a newer version.
105102

106103
For more information, see [Multi-targeting overview](../ide/visual-studio-multi-targeting-overview.md).
107104

@@ -120,5 +117,5 @@ File references are direct references to assemblies outside the context of a Vis
120117

121118
## See also
122119

123-
[Troubleshooting Broken References](../ide/troubleshooting-broken-references.md)
124-
[How to: Add or Remove References By Using the Reference Manager](../ide/how-to-add-or-remove-references-by-using-the-reference-manager.md)
120+
- [Troubleshooting broken references](../ide/troubleshooting-broken-references.md)
121+
- [How to: Add or remove references](../ide/how-to-add-or-remove-references-by-using-the-reference-manager.md)

0 commit comments

Comments
 (0)