Building hybrid .NET Framework and .NET Core solutions in Docker

The multistage builds you've seen up until now have all used the microsoft/dotnet-framework:4.7.2-sdk image or the microsoft/dotnet:2.2-sdk image on Docker Hub. These images provide the relevant .NET runtime, together with the SDK components to restore packages, compile source code, and publish applications.

The .NET Framework 4.7.2 image also contains the .NET Core 2.1 SDK, so if you're using those versions (or earlier), then you can build both .NET Framework and .NET Core apps in the same Dockerfile.

In the first edition of this book, there was no official image that had both the .NET Framework and .NET Core SDKs, so I showed you how to build your own using quite a complex Dockerfile with lots of Chocolatey installs. I also wrote, "I expect later releases of MSBuild and .NET Core will have integrated tooling, so the complexity of managing multiple toolchains will go away," and I'm glad to say that's where we are right now, with Microsoft managing those toolchains in Docker for us.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.254.118