You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that creates a NuGet package and it all works as expected.
However I did just notice that the .nupkg file gets overwritten every time I do a build even if it has not changed. Is there some way, perhaps using CopyToOutputDirectory that will only overwrite the file if it has changed.
I am tempted to build into a temporary location and then do the copy manually in the MSBuild project but I am wondering if this is already build in and I don't understand how to get it to work.
The text was updated successfully, but these errors were encountered:
Typically, you should not be building the package on build. NuGet API itself (for package creation, which is what we use) doesn't provide incrementality checks of any kind.
Perhaps this could be added as an inputs/outputs on the final package contents to be packed. But even that might not be precise, since many manifest properties come from the project properties, and not files, so the MSBuild incrementality wouldn't work in that case.
On second thought: so you're not trying to avoid the overhead of packing the .nupkg, just that the final file is not overwritten if it hasn't changed? Perhaps this could be added 🤔
I have a project that creates a NuGet package and it all works as expected.
However I did just notice that the .nupkg file gets overwritten every time I do a build even if it has not changed. Is there some way, perhaps using CopyToOutputDirectory that will only overwrite the file if it has changed.
I am tempted to build into a temporary location and then do the copy manually in the MSBuild project but I am wondering if this is already build in and I don't understand how to get it to work.
The text was updated successfully, but these errors were encountered: