Search

SSDT Bug - Error when renaming tables and then columns by thebread

Closed
as Not Reproducible Help for as Not Reproducible

1
0
Sign in
to vote
Type: Bug
ID: 777806
Opened: 1/29/2013 2:46:39 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
We are in the process of renaming existing tables (and a few columns within them) and then creating views to mimic the old table/column names. I got stuck for a few hours getting an error when I would try and compare the project to my local DB. After spending a few hours sifting through the refactor log I was able to find a workaround. If I dropped all of the new views (that mimic the renamed tables/columns) I was able to get the compare to complete and then apply all the changes at once.

The error I was getting: "Object reference not set to an instance of an object"
Details (expand)

Product Language

English

Version

SQL Server 2012 - Developer Edition

Category

Developer Tools (SSDT, BIDS, etc.)

Operating System

Other

Operating System Language

US English

Steps to Reproduce

* Rename existing table via Ctrl + R in Visual Studio
* Rename a column within table via Ctrl + R in Visual Studio
* Rename the table in SSMS (same rename as above) to "make room" for new view
* Create a view in SSMS with the same name/columns as the original table design
* Use compare schema tool to pull view script from DB (source) into project (destination)
* Attempt to compare project (source) to DB (destination) but it will fail with the above error.

Actual Results

"Object reference" error

Expected Results

A list of the changes that need to be applied to the target DB.

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by thebread on 2/28/2013 at 10:40 AM
Hello,

I believe that I am using the latest (December - v11.1.21208.0). I have had the same thing happen to me a couple times since I made this post. It could be that it only happens when the Compare/Update fails for some unrelated reason (like I am adding a not null column with no default) and then I attempt to run it again. In that scenario I have to drop the views from the DB and then rerun the Compare/Update in order to get past the issue/error.

Thanks,
Chris
Posted by Microsoft on 2/27/2013 at 5:13 PM
I can't reproduce the issue with the steps that you provided. I use the most recent SSDT build.Which SSDT build that you are using? The most recent SSDT build might fixed this.
Sign in to post a workaround.