ASP .NET CORE could not find file or assembly with custom assembly

前端 未结 2 1488
长发绾君心
长发绾君心 2020-12-29 23:01

I\'ve ran into a weird problem.

I basically have my own web-stack for .NET-core which I\'ve built into a few .dlls, and I want to reference these from another ASP CO

相关标签:
2条回答
  • 2020-12-29 23:44

    for load the external dll in core project, needed to:

    1. vs 2017 with version 15.3 or upper.
    2. Microsoft.Extensions.DependencyModel NuGet package installed in your project.
    0 讨论(0)
  • 2020-12-29 23:59

    The .NET Core Tooling in VS 2017 (< 15.3 preview) / .NET CLI < 2.0 doesn't fully support referencing assemblies on disk. You need to package the library up as a NuGet package or use a project reference ("same solution"). The technical reason is that all the required assemblies and versions are resolved during compilation and written to the .deps.json file. When loading arbitrary assemblies, this might fail because either the assembly or its dependencies cannot be found (or a conflict with each other).

    0 讨论(0)
提交回复
热议问题