TestProject Forum

C# Addon development with external reference [OPEN]

I’ve followed the provided documentation on addon development with the C# SDK and found it lacking in some specific details.

In my addon I have an external reference (System.Data.SqlClient). I am referencing this library via the nuget package. I packaged the addon as per the documentation (built the project, created a zip from the contents in the bin folder and including the manifest file) and uploaded to TestProject.

When I attempt to use the addon, it fails with the following message:

Could not load file or assembly ‘System.Data.SqlClient, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.

The documentation specifies that you can use external references in your addon, but doesn’t include specifics for the requirements for these refs.

Can anyone help me figure out what I’m missing?

Hi @tim.rendall .
In order to upload an addon with external dependencies, you must package all external dependencies (except for the TestProject.SDK related files). You can do that by running dotnet package command and marking the TestProject.SDK PackageReference tag with Publish="false"