.Net Standard Class Library Dependencies

How Can We Help?

.Net Standard Class Library Dependencies

< Back

Developing a class library that targets the .Net Standard framework allows for its use on a larger variety of platforms over the .Net Framework. However, Visual Studio assumes that such libraries will either be used directly by another project in the solution or be packaged and deployed on NuGet. This enables a more streamlined project build, where all of its NuGet dependencies are omitted. This becomes a problem if there is need for such dependencies to be easily accessed, such as when packaging an XMIoT Agent.

Fortunately, it is possible to instruct .Net Standard projects to include such dependencies when built. To do this, the project file must be manually edited.

Locate the desired project, right-click it, and select “Unload Project” from the context menu.

Right-click it once again and select “Edit.”

Insert the following xml tag into any existing PropertyGroup tag. Alongside the TargetFramework tag as shown is recommended, but not required.

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

Save the file, then right-click the project and select “Reload Project” from the context menu.

Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X