I am experiencing an issue working with a database project in Visual Studio 2010 Ultimate with TFS. The following describes the work flow that I use:
- I work locally modifying a SQL schema via SQL Server Management Studio.
- Next I open up the Visual Studio database project & perform a "Schema Compare" operation.
- I choose my local database with the latest changes as the "Source Schema" and the "Target Schema" as the database project.
- Next I look at the "Schema Comparison" results and choose "Skip" for the "Update Action" on items that I do not want to change. For the items I do want to change I choose the appropriate "Update Action".
- When I am finished I then choose the "Write Updates" command to apply the changes to the database project.
The problem that I have is that when I look at the database project, some of the database tables that I told to ignore get updated in the database project by commenting out the database create script.
For example this is what one looks like:
/*CREATE TABLE [SchemaName].[TableName] (
[Col1] BIGINT IDENTITY (1, 20) NOT NULL,
[Col2] INT NULL
);*/
The question is: Since I told the compare to ignore this table then why did it modify the project and comment out the code?