Getting “This assembly was expected to be in the local runtime” store when publishing to a Docker service

After having updated some ASP.NET Core Nuget packages, this may happen on the target Docker container instance:


 

This can be solved by editing the project file to include:

 

This makes the dotnet publish to bundle all the required files.

Can’t set break point in .NET Standard (std) library

Always hitting this issue when trying to set a debug break point in a shared .NET Std class library:

 

Here’s the workaround, edit the .NET Std Class Library Project file and add:

 

Run MongoDB in a Docker container on Docker for Windows

Just a note to self on how to run a MongoDB instance using Docker for Windows.

Create a volume to persist the Mongo database:

 

 

The run a MongoDB instance: