Skip to content

#3293 Resolved DacPac build issue, Wizard launcher build issue in VS2…#3331

Open
BillKrat wants to merge 4 commits intoErikEJ:masterfrom
BillKrat:Issue3293_DacPacHang
Open

#3293 Resolved DacPac build issue, Wizard launcher build issue in VS2…#3331
BillKrat wants to merge 4 commits intoErikEJ:masterfrom
BillKrat:Issue3293_DacPacHang

Conversation

@BillKrat
Copy link
Contributor

#3293 Resolved DacPac build issue, Wizard launcher build issue in VS026, and resolved build warnings.

I was able to duplicate the issue using the Database1.zip. I had to update how async was being used to invoke applicable processes and handle page navigation status updates. After updates, I was able to successfully navigate pages without hanging with proper status notifications.

The following is what was reported as to why I could not build in VS 2026 Insiders, I had to resolve this issue as well:
image

Copilot AI review requested due to automatic review settings March 14, 2026 13:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses reverse-engineering wizard hangs and DacPac/SQL project build reliability in the Visual Studio extension, along with a VS 2026-specific build/reference fix.

Changes:

  • Ensure selected SQL project is built (when needed) before using its produced .dacpac in the wizard flow.
  • Refactor wizard page visibility handling to support async page initialization without blocking navigation/status updates.
  • Update the VSIX project’s TemplateWizardInterface reference to resolve VS 2026 Insiders build issues.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/GUI/Shared/ItemWizard/ReverseEngineerWizardLauncher.cs Normalizes file header/encoding (no functional change).
src/GUI/Shared/Handlers/ReverseEngineer/RevEngWizardHandler.cs Forces SQL project build when a .sqlproj is selected to obtain a valid .dacpac.
src/GUI/EFCorePowerTools/Wizard/WizardResultPageFunction.cs Adds async page-visible hook and switches statusbar reset handling to await async initialization.
src/GUI/EFCorePowerTools/Wizard/Wiz1_PickServerDatabaseDialog.cs Converts page-visible initialization to async/await and removes blocking JTF.Run usage.
src/GUI/EFCorePowerTools/Wizard/Wiz2_PickTablesDialog.cs Converts database object loading initialization to async/await and removes blocking JTF.Run usage.
src/GUI/EFCorePowerTools/EFCorePowerTools.csproj Changes TemplateWizardInterface reference resolution to a HintPath to support VS 2026 Insiders.
Comments suppressed due to low confidence (2)

src/GUI/EFCorePowerTools/Wizard/Wiz1_PickServerDatabaseDialog.cs:148

  • The result of InvokeWithErrorHandlingAsync(...) is ignored here. When it returns false, it has already navigated to the status/error page; continuing to run the rest of this method can lead to additional UI updates/navigation on the wrong page. Consider capturing the return value and return early when it is false.
                await InvokeWithErrorHandlingAsync(async () =>
                {
                    viewModel.WizardEventArgs.PickServerDatabaseDialog = this;
                    await wizardViewModel.Bll.ReverseEngineerCodeFirstAsync(null, viewModel.WizardEventArgs);
                    return true;
                });

                foreach (var option in viewModel.WizardEventArgs.Configurations.Where(option => !wizardViewModel.Configurations.Any(o => o.DisplayName == option.DisplayName)))
                {
                    wizardViewModel.Configurations.Add(option);
                }

                OnConfigurationChange(wizardViewModel.WizardEventArgs.Configurations.FirstOrDefault());
            }

src/GUI/Shared/Handlers/ReverseEngineer/RevEngWizardHandler.cs:654

  • SqlProjHelper.BuildSqlProjectAsync(...) throws InvalidOperationException on build failure or missing dacpac output. Because the call isn’t wrapped, this method will throw before the string.IsNullOrEmpty(options.Dacpac) check and can bypass the intended user-facing message/null return path. Consider catching exceptions around the build, setting an appropriate status/message, and returning null consistently.
                options.Dacpac = await SqlProjHelper.BuildSqlProjectAsync(options.Dacpac, mustBuild: true);
                if (string.IsNullOrEmpty(options.Dacpac))
                {
                    VSHelper.ShowMessage(ReverseEngineerLocale.UnableToBuildSelectedDatabaseProject);
                    return null;
                }

@BillKrat
Copy link
Contributor Author

Captured Copilot's findings and fixing locally, will test, and commit updates

@BillKrat
Copy link
Contributor Author

@ErikEJ I resolved Copilot findings and it is ready to go

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 14, 2026

@BillKrat Build fails, due to .NET SDK updates.

Maybe you can try this update to global.json:

"rollForward": "latestPatch"

@BillKrat
Copy link
Contributor Author

@ErikEJ thanks for the heads up. We're back at the move but I'll take a moment to see if I can't clear this up.

@BillKrat
Copy link
Contributor Author

@ErikEJ I'm working through the VSIX / Build issues

@BillKrat
Copy link
Contributor Author

@ErikEJ okay, looks like it is good to go now. For a sanity check, I just now tested against Database1 and my local project database connection and all works well.

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 15, 2026

@BillKrat Thanks a lot, highly appreciated

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 15, 2026

@BillKrat I will cherry pick your changes, I have no issues with building in VS 2026, and will not use your project settings.

@BillKrat
Copy link
Contributor Author

@BillKrat I will cherry pick your changes, I have no issues with building in VS 2026, and will not use your project settings.

That was odd, I had to exclude the wizard launch file during triage, perhaps my VS was too far out of sync; for hobby time I’m strictly on my Mac using VS Code learning Next.js and PostgresSql for my AI adventures.

I use Insiders for both VS Code and VS 26 - ill be more careful next time to align with your project.

@BillKrat
Copy link
Contributor Author

@ErikEJ would it make it easier for you if I remove my project changes and commit? Versus having to do a cherry pick.

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 16, 2026

No worries, I will just pick the relevant changes when I get round to it.

@BillKrat
Copy link
Contributor Author

BillKrat commented Mar 21, 2026

FYI, after setting up my new Mac Mini M4, I decided to address why I could not build the project. Copilot will make the necessary changes (as we've discussed), but not address the real problem. The issue is with Visual Studio 2026 "Insiders" not having the SDK selected by default (see red #1 in image below). It isn't readily apparent because the Extension Development feature is selected (assumption being that all is well).

  1. I opened the node (red circle 1) and guessed that the Windows 11 SDK had to be installed (I checked it)
  2. I let it do the install and then was greeted with (red circle 2) which was more intuitive, I clicked it and it went back into another install and when it completed I could now load the projects and build without issue.
image

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 21, 2026

@BillKrat glad you figured it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants