3

I wrote a simple ASP.NET Core 3.1 Web app based on the Template in VS2019. Published the app to the file system targetting netcoreapp3.1 in Framework-Dependent deployment mode and targetting the portable runtime.

The app works fine on my dev box through IIS express, running the app.exe and dotnet app.dll.

Set it up on our staging IIS and no joy. Running app.exe works as expected, but dotnet app.dll does not. Instead it tells me

An assembly specified in the application dependencies manifest (SmartDirectoryNG.deps.json) was not found: package: 'Microsoft.Win32.Registry.AccessControl', version: '4.7.0' path: 'runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.AccessControl.dll'

When I publish the app to target win-x64, everything works just fine.

I feel eerily reminded of assembly redirect hell on the full .NET framework, but I'm curious: why does it work when I publish for win-x64? the Microsoft.Win32.Registry.AccessControl.dll is after all always present in the same directory as app.exe and app.dll, and app.exe does find it. It seems in portable mode, it doesn't look for dependencies in the app directory.

So what am I missing here?

Stephan Steiner
  • 1,043
  • 1
  • 9
  • 22

0 Answers0