question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to generate dacpac (and therefore entities/DB contexts) from SSDT project - suggestions for debugging?

See original GitHub issue

When 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:closed
  • Created a year ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
IanKempcommented, Aug 15, 2022

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.

0reactions
ErikEJcommented, Aug 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found