Referencing Assemblies

Class Libraries

When building class libraries that target .NET 6+, the assemblies that are referenced via NuGet will not be copied to the bin folder unless the following element is added to the library's csproj file:

App.csproj
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

All referenced assemblies should be copied automatically in .NET Framework.

Dynamic Assemblies

If a project or assembly reference is not used in the main Wisej project, the referenced project's dependencies will not be loaded into the App Domain automatically.

In .NET Framework, any assembly referenced by the main Wisej project would have it's dependencies loaded into the App Domain.

For example:

If you create a custom control library that implements a custom Bubbles notification that gets dynamically injected into the main Wisej project, you will need to call Application.LoadAssembly() on Wisej.Web.Ext.Bubbles to load the custom library's dependency into the Wisej project.

Last updated