#3293 Resolved DacPac build issue, Wizard launcher build issue in VS2…#3331
#3293 Resolved DacPac build issue, Wizard launcher build issue in VS2…#3331BillKrat wants to merge 4 commits intoErikEJ:masterfrom
Conversation
…in VS2026, and resolved build warnings
There was a problem hiding this comment.
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
.dacpacin the wizard flow. - Refactor wizard page visibility handling to support async page initialization without blocking navigation/status updates.
- Update the VSIX project’s
TemplateWizardInterfacereference 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 returnsfalse, 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 andreturnearly when it isfalse.
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(...)throwsInvalidOperationExceptionon build failure or missing dacpac output. Because the call isn’t wrapped, this method will throw before thestring.IsNullOrEmpty(options.Dacpac)check and can bypass the intended user-facing message/nullreturn path. Consider catching exceptions around the build, setting an appropriate status/message, and returningnullconsistently.
options.Dacpac = await SqlProjHelper.BuildSqlProjectAsync(options.Dacpac, mustBuild: true);
if (string.IsNullOrEmpty(options.Dacpac))
{
VSHelper.ShowMessage(ReverseEngineerLocale.UnableToBuildSelectedDatabaseProject);
return null;
}
src/GUI/EFCorePowerTools/Wizard/Wiz1_PickServerDatabaseDialog.cs
Outdated
Show resolved
Hide resolved
|
Captured Copilot's findings and fixing locally, will test, and commit updates |
|
@ErikEJ I resolved Copilot findings and it is ready to go |
|
@BillKrat Build fails, due to .NET SDK updates. Maybe you can try this update to global.json: "rollForward": "latestPatch" |
|
@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. |
|
@ErikEJ I'm working through the VSIX / Build issues |
|
@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. |
|
@BillKrat Thanks a lot, highly appreciated |
|
@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. |
|
@ErikEJ would it make it easier for you if I remove my project changes and commit? Versus having to do a cherry pick. |
|
No worries, I will just pick the relevant changes when I get round to it. |
|
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).
|
|
@BillKrat glad you figured it out |

#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:
