Repository navigation
Add Unpack tool for DACPAC files (command line only) - #33
Conversation
Co-authored-by: ErikEJ <4169187+ErikEJ@users.noreply.github.com>
Co-authored-by: ErikEJ <4169187+ErikEJ@users.noreply.github.com>
Co-authored-by: ErikEJ <4169187+ErikEJ@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new "unpack" command line option that extracts SQL schema files from DACPAC files, following the same pattern as the existing import command. It adds functionality to both the command-line tool and Visual Studio extension to unpack DACPAC files using Microsoft's DacServices.Unpack method.
- Adds
unpackcommand to DacFXTool with file validation and error handling - Creates
DacPackageUnpackerclass in DacFXToolLib following existing architectural patterns - Updates Visual Studio extension with full unpack functionality including file dialog and process integration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DacFXTool/Program.cs | Adds command-line parsing for unpack command with DACPAC file validation |
| src/DacFXToolLib/DacPackageUnpacker.cs | New class that encapsulates DACPAC unpacking logic using DacServices |
| src/Vsix/Commands/UnpackCommand.cs | Updates placeholder implementation to call UnpackHandler |
| src/Vsix/Handlers/UnpackHandler.cs | New handler providing file dialog and managing the unpacking process |
| src/Vsix/Handlers/ProcessLauncher.cs | Adds GetUnpackAsync method following established pattern |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot Please revert any changes to the Visual Studio extension in the src/Vsix folder, they have already been implemented in another PR |
Co-authored-by: ErikEJ <4169187+ErikEJ@users.noreply.github.com>
Reverted all Visual Studio extension changes in the src/Vsix folder. The core DacFXTool command line functionality remains intact. Changes reverted in commit 4a7e33d. |
Implements a new "unpack" command line option that extracts SQL schema files from DACPAC files, following the same pattern as the existing import command. This addresses issue requirements to add unpack functionality using the
DacService.Unpackmethod.Changes
DacFXTool Command Line Interface:
unpackcommand:DacFXTool unpack <dacpac-file> <output-directory>Microsoft.SqlServer.Dac.DacServices.Unpack()static method as specified in Microsoft documentationDacFXToolLib Library:
DacPackageUnpackerclass that encapsulates the unpack logicDatabaseExtractorclassUsage
Command Line:
The implementation maintains consistency with existing code patterns and provides a programmatic interface for unpacking DACPAC files. Visual Studio extension integration is handled separately in another PR.
Fixes #21
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.