Add a third-party library to the Visual Studio Code project

Add a third-party .NET library by editing the
CSPROJ
project file.
Set Visual Studio Code as the default external code editor. See Set the default code editor.
  1. Copy the .NET assembly for the library to the
    ProjectFiles/NetSolution
    FactoryTalk Optix Studio
    project folder.
  2. From the main toolbar, select Open .NET Solution.
    The default external code editor opens.
    TIP: We recommend using Microsoft Visual Studio 2022 or Microsoft Visual Studio Code as the default code editor. Some development assistance features may not be available when using a different code editor.
  3. In Visual Studio Code, open the
    CSPROJ
    project file.
  4. Add the following
    <Reference>
    element as a child of the
    <ItemGroup>
    element.
    <Reference Include="
    library
    "> <HintPath>
    path
    </HintPath> <Private>False</Private> </Reference>
    library
    The library that you want to add. For example:
    MyLibrary
    path
    The path to the library from 1. For example:
    ..\MyLibrary.dll
    <ItemGroup> <Reference Include="MyLibrary"> <HintPath>..\MyLibrary.dll</HintPath> <Private>False</Private> </Reference> <!-- The rest of the code --> </ItemGroup>
  5. Save the
    CSPROJ
    file.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.