I have a requirement where I need to zip some files after I build a solution file.
Could this be achieved automatically once I build my project in Release/Debug mode?
Using powershell, only when doing Release build:if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)*.dll', '$(TargetDir)*.pdb', '$(TargetDir)*.config' -DestinationPath '$(SolutionDir)PublishOutput\YourNameHere.zip' -Force)
It only zips the dll, pdb and config files.-Force
is used to overwrite the zip file on each build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With