I have a Razor Class Library that I'm building with static web assets. When I dotnet pack
locally, in debug
or release
configuration, the static files are, as expected, packed in the staticwebassets
folder and can be exposed in a consuming web app from _content/{packageid}
:
However, when I pack it via an Azure DevOps pipeline, I get three versions of the static files in various paths under content
, contentFiles
and staticwebassets
:
Naturally, this makes the package about three times the size. Here's my command line locally:
dotnet pack --verbosity Detailed -c Release
This is what Azure DevOps creates from the classic dotnet pack task:
dotnet pack {project path}/MyProject.csproj --output /home/vsts/work/1/a --no-build /p:Configuration=Release /p:PackageVersion=18.0.99-CI-20220831-194937 --verbosity Detailed
This generates hundreds (thousands?) of lines of logging, so I'm not sure where to look to understand the difference. The MSBuild version is the same in both. These appear essentially the same to me, but something has to be different.