How to debug dotnet.exe when it does not find dll?

I have an ASP.NET MVC Core 2.0 application, and when I create it, the output DLL files are created in bin\Debug\netcoreapp2.0.

When I publish it using the default values, publication exits are created in the folder bin\Debug\netcoreapp2.0\Publish.

Now, when I use dotnetto launch my application from a folder Publish, everything works fine.

dotnet D:\Project\bin\Debug\netcoreapp2.0\Publish\Project.dll

However, when I use dotnetto run my application from netcoreapp2.0, he complains that he cannot find the necessary DLL files.

dotnet D:\Project\bin\Debug\netcoreapp2.0\Project.dll // this breaks

Project.dlldepends on another library, and this library exists both in the folder netcoreapp2.0and in the folder Publish. Why dotnetcan it be downloaded from one folder and cannot be downloaded from another folder? How do I debug this?

+4
source share

Source: https://habr.com/ru/post/1690115/


All Articles