D365DeveloperExtensions icon indicating copy to clipboard operation
D365DeveloperExtensions copied to clipboard

Unpack Solution does not delete old files in .\package folder & "Output" is incorrect.

Open simes1 opened this issue 4 years ago • 2 comments

I've noticed a couple of things when unpacking solutions with D365DevEx.

  1. What is displayed in the "Output" window is not what D365DevEx does when unpacking a solution: image

It actually appears to export the solution to %temp% and unpack to a new folder in %temp% with the same name as the solution file. Then it appears to copy the solution zip to (or wherever you've chosen to store it) the and contents of unpacked solution folder to \package (or wherever you've chosen to store than). Finally (providing it doesn't crash along the way) it then deletes the solution zip and folder in %temp%.

What is in the "Output" window does not achieve the same effect if run manually [filename part of solution file missing, final \package part of extract folder missing and ought to use /allowDelete:Yes (unless it is going to prompt for deletes somehow)]

  1. The copy does not remove files from the target \package folder that are not in the source %temp%<solutionfilename> folder. So if you've removed something from your solution it will still be in source control.

  2. It would also be nice if it remembered the settings for "Enable Solution Packager Log?" and "Store Solution Files?" between sessions.

simes1 avatar Mar 09 '21 20:03 simes1

I believe that is a feature of the SolutionPackager to retain existing files or to remove before unpacking. I will need to look into this.

tsharp avatar Apr 13 '21 05:04 tsharp

As the command line displayed in the Output window doesn't appear to match what is actually being used it's hard to know if the /allowDelete:Yes option is being used. If D365DevEx is copying from %temp%\solutionfilename to .\package (as opposed to this behaviour being some artefact of how the solution packager itself operates) then the copy would also need to delete unwanted files in the .\package folder.

simes1 avatar Apr 13 '21 10:04 simes1