Creating bacpac failed (DoAllowRowLocks / DoAllowPageLocks)
I have fixed the problems using these script:

[Rebuild all indexes]

USE AdventureWorks;
declare @table_name varchar(200)
declare @SQL varchar(300)

DECLARE vendor_cursor cursor 
        FOR SELECT sys.tables.name
        FROM sys.tables WHERE sys.tables.name NOT LIKE '%_dss'
OPEN vendor_cursor

FETCH NEXT FROM vendor_cursor 
INTO @table_name

WHILE @@FETCH_STATUS = 0
BEGIN
 SELECT @SQL =  'ALTER INDEX ALL ON '+@table_name+' REBUILD';
 EXEC(@SQL);
 print 'INDEX Rebuild on all indexes in table '+@table_name+' is done.';
 FETCH NEXT FROM vendor_cursor  INTO @table_name
END 
CLOSE vendor_cursor;
DEALLOCATE vendor_cursor;
GO


I also needed to change the IsNotForReplication property.
This script turns it YES for all tables that have an identity column.

EXEC sp_msforeachtable @command1 = '
declare @int int
set @int =object_id("?")
EXEC sys.sp_identitycolumnforreplication @int, 1'


This script turns it NO for all tables that have an identity column.

EXEC sp_msforeachtable @command1 = ‘
declare @int int
set @int =object_id(“?”)
EXEC sys.sp_identitycolumnforreplication @int, 0′