You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/how-to-add-or-remove-references-by-using-the-reference-manager.md
+19-24Lines changed: 19 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,8 @@
1
1
---
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
11
6
f1_keywords:
12
7
- "VS.ReferenceManager"
13
8
helpviewer_keywords:
@@ -24,11 +19,11 @@ helpviewer_keywords:
24
19
- "referencing components, assemblies not listed"
25
20
author: "gewarren"
26
21
ms.author: "gewarren"
27
-
manager: ghogen
22
+
manager: douge
28
23
ms.workload:
29
24
- "multiple"
30
25
---
31
-
# How to: add or remove references by using the Reference Manager
26
+
# How to: Add or remove references by using the Reference Manager
32
27
33
28
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.
34
29
@@ -46,16 +41,16 @@ The **Reference Manager** dialog box shows different categories on the left side
46
41
47
42
- Browse, with the Recent subgroup.
48
43
49
-
## Adding and removing a reference
44
+
## Add and remove a reference
50
45
51
46
### To add a reference
52
47
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**.
56
49
57
50
**Reference Manager** opens and lists the available references by group.
58
51
52
+
2. Specify the references to add, and then select **OK**.
53
+
59
54
## Assemblies tab
60
55
61
56
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
134
129
135
130
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.
136
131
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
142
133
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.
146
135
147
136
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).
148
137
@@ -191,6 +180,12 @@ An SDK is a collection of files that Visual Studio treats as a single component.
191
180
192
181
If a project type doesn't support **Extensions**, the tab doesn't appear in the **Reference Manager** dialog box.
193
182
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
+
194
189
## Browse button
195
190
196
191
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
226
221
227
222
## See also
228
223
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)
Copy file name to clipboardExpand all lines: docs/ide/managing-references-in-a-project.md
+18-21Lines changed: 18 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,8 @@
1
1
---
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
11
6
f1_keywords:
12
7
- "vs.ProjectPropertiesReferencePaths"
13
8
- "cs.ProjectPropertiesReferencePaths"
@@ -24,19 +19,19 @@ helpviewer_keywords:
24
19
- "objects [Visual Studio], referencing"
25
20
author: "gewarren"
26
21
ms.author: "gewarren"
27
-
manager: ghogen
22
+
manager: douge
28
23
ms.workload:
29
24
- "multiple"
30
25
---
31
-
# Managing references in a project
26
+
# Manage references in a project
32
27
33
28
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.
34
29
35
-
To add a reference, right click on the Referencesnode 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).
36
31
37
-

32
+

38
33
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:
40
35
41
36
- .NET Framework class libraries or assemblies
42
37
@@ -76,11 +71,11 @@ If you determine that the Extension SDK being referenced by your app is not supp
76
71
77
72
1. Restart Visual Studio and open your app.
78
73
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**.
80
75
81
76
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**.
82
77
83
-
## Adding a reference at design time
78
+
## Add a reference at design time
84
79
85
80
When you make a reference to an assembly in your project, Visual Studio searches for the assembly in the following locations:
86
81
@@ -89,7 +84,9 @@ When you make a reference to an assembly in your project, Visual Studio searches
89
84
- Other project directories in the same solution. (You can find these assemblies on the **Projects** tab.)
90
85
91
86
> [!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`.
93
90
94
91
## References to shared components at run time
95
92
@@ -99,9 +96,9 @@ If you deploy an application that contains a reference to a custom component tha
99
96
100
97
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**.
101
98
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
103
100
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.
105
102
106
103
For more information, see [Multi-targeting overview](../ide/visual-studio-multi-targeting-overview.md).
107
104
@@ -120,5 +117,5 @@ File references are direct references to assemblies outside the context of a Vis
0 commit comments