Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected failure when publishing using SqlPackage: Object reference not set to an instance of an object #498

Open
rpmrmartin opened this issue Sep 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rpmrmartin
Copy link

  • SqlPackage or DacFx Version: 162.4.92
  • .NET Framework (Windows-only) or .NET Core: .NET 8.0.400
  • Environment (local platform and source/target platforms): Windows 11 23H2 publishing to SQL Server 2019 CU 28

Steps to Reproduce:

  1. Publish a dacpac using the following command: sqlpackage /Action:Publish '/SourceFile:C:\Users\rmartin\rpm\RPM34\Config\database\RpmSubscriber\bin\Release\RpmSubscriber.dacpac' '/TargetConnectionString:<redacted>' /Variables:GlobalServer=Test34 /Variables:RpmGlobal=RpmGlobal '/Profile:C:\Users\rmartin\rpm\RPM34\Config\database\RpmSubscriber\RpmSubscriber.publish.xml' /Properties:BlockOnPossibleDataLoss=False
  2. Get the following output from SqlPackage:

Publishing to database '<redacted>' on server 'TEST34'.
Initializing deployment (Start)
Initializing deployment (Failed)
Time elapsed 0:00:32.37
*** An unexpected failure occurred: Object reference not set to an instance of an object..

  1. SqlPackage exits with code 1

Publishing to an empty database works fine, but immediately republishing to the same database (now containing the objects in our project) gives the error above. I can't share the dacpac I'm trying to publish publicly but I can share it privately with contributors to this repo.

Did this occur in prior versions? If not - which version(s) did it work in?

No. Used to work in SqlPackage 162.3.566 and 162.2.111

@rpmrmartin rpmrmartin added the bug Something isn't working label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant