Useful for optimizing cache reuse in containerized .NET builds
COPY ["MySolution.sln", "**/*.csproj", "./"]
RUN recreate-sln-structure MySolution.sln && dotnet restore MySolution.sln
Description:
Recreate solution directory tree, i.e. for use in building a containerized .NET application with cached restore layer
Takes the path to a solution (.sln) file as input, and moves
Example: 'recreate-sln-structure MySolution.sln'
Usage:
recreate-sln-structure <path to sln> [options]
Arguments:
<path to sln> File path to the solution (.sln) file
Options:
-i, --ignore-missing-projects Ignore missing project files [default: False]
--version Show version information
-?, -h, --help Show help and usage information