Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio 2013 database publish do nothing

I'm trying to publish a DB project in Visual Studio 2013 Professional and the "Publish" button do nothing. In project properties I checked "Create script (.sql file)". I right click the project name in solution explorer > Publish... > Load Profile (a profile that works for my colleagues) > Publish

Nothing Happens, not an error, warning or anything (same with "Generate Scripts" button). Visual studio error logs say nothing and I tried to restart the PC, Visual studio and SQL server.

Thank you!

like image 358
Crispy Holiday Avatar asked Sep 10 '14 06:09

Crispy Holiday


People also ask

How do I add an existing database to Visual Studio?

To connect to a database instance In Visual Studio, make sure that SQL Server Object Explorer is open. If it is not, click the View menu and select SQL Server Object Explorer. Right-click the SQL Server node in SQL Server Object Explorer and select Add SQL Server.


2 Answers

If you have an Azure Cloud Explorer window open in Visual Studio (could be table, blob or queue), that leads to the Publish of an SSDT project hanging.

Close the window and start a new Publish operation. It may take a little longer than usual but eventually that will progress and you'll be able to close Visual Studio as normal.

Thanks to Noel Abrahams for his comment that led to this answer.

EDIT: putting it here as an answer so that it can be more easily found but credit goes to Noel.

like image 128
SvenAelterman Avatar answered Nov 13 '22 05:11

SvenAelterman


Found a fix on the MS Connect site.

In my publish profile I had set the connection string as so:

<TargetConnectionString>Data Source=.\sql2008r2;Integrated Security=SSPI;</TargetConnectionString>

According to the comments on Connect, it doesn't like Integrated Security=SSPI. Instead you should use Integrated Security=True;:

<TargetConnectionString>Data Source=.\sql2008r2;Integrated Security=True;</TargetConnectionString>

Then it all works fine.

like image 41
Rhumborl Avatar answered Nov 13 '22 04:11

Rhumborl