I’d like to write a simple C# script where I can manipulate the package before it’s copied to the output folder. If I write a simple C# script (as a process step) to rename some files on my target tentacle it works.
If I try and do something similar (pre copy to output folder) and use the “Custom deployment scripts” feature for a NuGet package it will fail. It appears to first try and restore all Nuget packages from the packages.config and then it to attempt to import all of the assemblies from my /bin folder which fails.
Is this a bug or expected behavior? and is there a way to prevent the nuget restore and import.
Just to clarify, running a script step will take place before the package is extracted and as noted in the documentation the
custom deployment scripts feature run after the files are extracted. This is by design.
What are you trying to do to the package itself? So that we can work out the best way to achieve this could you let us know what scenario it is that you are trying to support.
Yep totally understand the order of events. The issue is that I don’t believe that executing a simple C# script during the pre-deployment step of a NuGet package should implicitly include all the dependencies of my current package and my NuGet packages folder or at the least it should provide the option to include/exclude as required.