You want to test the GAEB & AVA .Net Libraries? Please contact us to obtain an evaluation version.

This article focuses on the most common questions when setting up the GAEB & AVA .Net Libraries in Visual Studio projects.

Tip: You can directly download the example project in GitHub. It is available in the classic solution format for all versions of Visual Studio 2010 and newer or in the new solution format for Visual Studio 2017. You just have to drop in the evaluation packages from DanglIT as described in the readme and you are ready to go.

External Dependencies

The GAEB & AVA .Net Libraries depend on some Open Source modules by DanglIT and additional, freely available, third party modules. These can be found in the public NuGet repository, the official .Net package manager.

Please manually add these package references in the latest, stable versions. If you reference the GAEB & AVA .Net Libraries as NuGet packages (for customers with a maintenance plan via the official DanglIT NuGet feed or from a local package source), the dependencies are added automatically.

DanglIT customers get a listing of all third party modules and their licenses. Additionally, you find this in both the documentation and the libraries source code.

Referencing GAEB & AVA .Net Libraries

You have two options to add the GAEB & AVA .Net Libraries to your project: Either you reference the dlls directly or you add the libraries as NuGet packages. Using NuGet is the recommended option, because all other dependencies are then automatically resolved.

Adding Packages from a Local Package Source

The evaluation package has a NuGet file for every module, for example Dangl.AVA.1.4.0.nupkg. This contains both the actual code as compiled dll as well as metadata that helps Visual Studio or the Dotnet CLI to resolve references. To use the packages, please follow these two steps:

  • Create a folder called LocalPackages in your solution root, at the level of your *.sln solution file. Copy all NuGet packages into this folder.
  • Create a file called NuGet.config in the solution root. This file is used to configure NuGet package sources, meaning it tells Visual Studio where to find .Net module references. The file content should look like the following to add the created folder as local package source:

If Visual Studio was opened, please close and restart it. Now you can select localPackages as source in the NuGet browser and reference the Dangl.GAEB & Dangl.AVA packages.

Adding Packages from the Dangl IT NuGet Feed

Customers with a maintenance plan have the option to comfortably reference packages via the official DanglIT NuGet feed. You find instructions to set this up in the project readme as well as in the documentation.

Troubleshooting

System.IO.FileLoadException

When dlls are referenced directly, it's possible that some dependencies can not be resolved. A System.IO.FileLoadException is caused. Please ensure first that all required modules from the public NuGet registry are referenced. If the error persists, please check if there might be a version conflict. It is possible that a reference is present, but in a different version than expected. In this case, you have to define an AssemblyRedirect to configure which version should be used at runtime.

In the following example, app.config is used to configure that all dependencies to Newtonsoft.Json between versions 0.0.0.0. and 10.0.0.0 are to be redirected to version 10.0.0.0.

Do you have additional questions? Contact us!