Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

dotnet pack Release configuration is 3x the size of debug

$
0
0

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}:

enter image description here

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:

enter image description here

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.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>