When trying to export a data tier application or dacpac from a database that contains functions that use "for xml" every single function and every single object that depends upon that function fails and I am not able to create the dacpac. The wizard reports those objects as not supported.
Database : SQL Server 2008 R2
The error that the functions fail with:
[dbo].[fn_FunctionName] () Failed Depends on object '[XmlData].[value] (UnresolvedEntity)', which does not exist in this database.
Example query:
declare @XMLColumn xml = '<Example><Node>Test</Node></Example>'
select XmlData.value('.', 'varchar(50)') + ';'
from @XMLColumn.nodes('/Example/Node') T2(XmlData)
for xml path('')