none
Unable to load BingMapsRESTToolkit assembly when referencing .NET Standard 2.0 project from .NET Framework 4.7 project RRS feed

  • Question

  • I've implemented the BingMapsRESTToolkit in a library project that targets .NET Standard 2.0 Framework.  When referenced from a project that targets .NET Core 2.0, the assembly loads and works correctly.  When running the exact same code from a project that targets .NET Framework 4.7, the project compiles and NuGet downloads the assemblies, but at run-time, it throws an exception:

    "Could not load file or assembly 'BingMapsRESTToolkit.Standard, Version=1.0.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

    The exception details indicate that at run-time it's looking for "BingMapsRESTToolkit.Standard.dll", but the bin directory contains "BingMapsRESTToolkit.dll".

    The NuGet spec:

    https://github.com/Microsoft/BingMapsRESTToolkit/blob/master/Build/BingMapsRESTToolkit.nuspec

    Indicates that for .NET Standard 2.0, the file should be named "BingMapsRESTToolkit.Standard.dll", while for all other frameworks the file is named "BingMapsRESTToolkit.Standard.dll".

    Is this to be expected?

    Thursday, February 1, 2018 6:24 PM

Answers

All replies