Home > OS >  "dotnet publish" doesn't publish nuget packages when it's older than the current
"dotnet publish" doesn't publish nuget packages when it's older than the current

Time:11-29

I'm using Asp.net core 6.0. When I upgrade nuget package to the new version and publish it, it replaces the old .dll file with the new one in the "publish" and "release" folders. But when I want to undo this, downgrade the version of nuget package and republish it, it replaces in the "release" folder but not in the "publish" folder. The new version of the package remains in the "publish" folder.

I've tried to publish app with the CLI "dotnet publish -c Release" and with IDEs too (Visual studio, Rider). But the same result.

CodePudding user response:

According to here just publish it to another folder! They do not think it is a bug

So this appears to be by-design since you're reusing the same directory!

  • Related