Unable to generate dacpac (and therefore entities/DB contexts) from SSDT project - suggestions for debugging?
See original GitHub issueWhen attempting to generate entities from an SSDT project (.sqlproj
) that produces a dacpac, an exception is thrown:
System.InvalidOperationException: Dacpac build failed, please pick the file manually
at async Task<string> EFCorePowerTools.Extensions.EnvDteExtensions.BuildSqlProjAsync(string sqlprojPath)
at async Task<DatabaseConnectionModel> EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.GetDatabaseInfoAsync(ReverseEngineerOptions options)
at async Task EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.ReverseEngineerCodeFirstAsync(Project project, string optionsPath, bool onlyGenerate, bool fromSqlProj)
As the database in question is a proprietary one, I obviously cannot provide it to allow you to debug. As such I would appreciate information/suggestions on how to debug this myself, so that I can provide more information as comments here to help you fix it and/or potentially submit a PR to resolve it.
Provide steps to reproduce
Unable as this is a proprietary database.
Provide technical details
-
EF Core version in use: EF Core 6
-
Is Handlebars used: no
-
Is .dacpac used: no
-
EF Core Power Tools version: 2.5
-
Database engine: MSSQL 2017
-
Visual Studio version: VS 2022
Issue Analytics
- State:
- Created a year ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Could not find file dacpac? - sql server
The solution is simple, just right-click on the database project and Rebuild. This will create the dacpac file and allow you to publish....
Read more >Troubleshooting failed DACPAC deployments
First you need to make sure that you are running the SqlPackage using the latest build. From the root folder of your local...
Read more >Azure SQL DacPac deployment failing when trying to drop ...
Hi, my release in Azure DevOps fails when trying to deploy a dacpac saying: "The column [dbo].[table_Name].[bRowVersion] is being dropped, ...
Read more >Azure Devops failing to build sql server database project
I have a sql database project in Visual Studio (2019). I am trying to deploy it via azure devops. The pipeline is failing...
Read more >VS2019- Unable to locate master.dacpac during build · ...
The file master.dacpac is not found under path C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools. ... So, instead of using $( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm that using the DACPAC works correctly in the latest nightly (2.5.1082), thank you - and you have your well-deserved review.
I implemented a fix for this in the latest daily build, would be grateful if you could try it out.
I would be very grateful for a rating or review on Visual Studio Marketplace.