nulastudio / NetBeauty2

Move a .NET Framework/.NET Core app runtime components and dependencies into a sub-directory and make it beauty.
MIT License
419 stars 21 forks source link

Publish more than once #4

Closed Apostolique closed 4 years ago

Apostolique commented 4 years ago

If I run publish once, it works:

dotnet publish -r win-x64 -c Release

But if I run the command a second time, the .dll files don't get moved.

It looks like as long as the NetCoreBeauty file that gets generated exists, the .dll files don't get moved.

liesauer commented 4 years ago

you are right, once NetCoreBeauty exists, it won't run any more, so the deps.json won't be modified twice and the .dll won't be moved.

liesauer commented 4 years ago

this is designed on purpose. the tool expects that the application should be moved or packed and when you publish the second time, the release dir should be nothing in there or be clean up, so when you cross two big different versions this can prevent some weird bugs. but how ever, this will de improved.

Apostolique commented 4 years ago

Good to know! I'll try to follow that move or pack workflow for my releases.

liesauer commented 4 years ago

fixed in v1.1.8 two ways to force beauty:

  1. --force
    /path/to/ncbeauty --force /path/to/beauty runtimes
  2. ForceBeauty
    <ForceBeauty>True</ForceBeauty>

    add into PropertyGroup section in your csproj