Add AF SDK references to your project
- Last UpdatedFeb 18, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- PI Server
Before you can write code that uses an external component or connected service, your project must include a reference to it. A reference is an entry in the project file that tells Visual Studio where to find the component or service so your code can access its functionality. This topic explains how to add the AF SDK reference for both the .NET Framework and .NET 8 using Microsoft Visual Studio’s Reference Manager.
Add AF SDK references: .NET Framework AF SDK applications
-
In Visual Studio, select Project, then select Add reference.
The Reference Manager window opens.
-
Select Assemblies, then select the Extensions node.
A list of custom assemblies displays.
-
Scroll through the list to locate OSIsoft items or enter 'OSIsoft' in the Search Assemblies text box.
-
Select the check box next to OSIsoft AFSDK version 4.0.0.0.
Tip: Make sure to select OSIsoft AFSDK, not OSIsoft.PISDK. Also be sure to select version 4, not version 2.
-
Select OK.
The Reference Manager window closes and changes are applied.
The references added with Reference Manager now apply to the entire project, including the referenced dynamic link libraries (DLLs or library files).
Add AF SDK references: .NET 8+ AF SDK applications
-
In Visual Studio, select Tools, select NuGet Package Manager, then select Manage NuGet Packages for Solution.
The NuGet Package Manager window opens.
-
In the Package source menu, select nuget.org.
-
(Optional) If nuget.org is not available, select the gear icon next to the dropdown menu, then enter https://api.nuget.org/v3/index.json.
Nuget is added as the new package source.
-
On the Browse tab's search bar, enter Aveva.AFSDK and press Enter.
-
Select the correct version, then select Install to add it to your project.