Description
I executed the tSQLt.class.sql file on an Azure SQL database. It worked well and I was able to use it there.
But when I wanted to export the database (via "Generate Scripts" in SQL Server Management Studio or directly from the Azure portal), I got errors like:
Error SQL71501: Error validating element [tSQLt].[Private_GetFullTypeName]: Function: [tSQLt].[Private_GetFullTypeName] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [tSQLt].[Private_SysTypes].[schema_id] or [tSQLt].[Private_SysTypes].[T].
Error SQL71501: Error validating element [tSQLt].[Private_ScriptIndex]: Function: [tSQLt].[Private_ScriptIndex] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [tSQLt].[Private_SysIndexes].[I] or [tSQLt].[Private_SysIndexes].[type].
I tried on my local machine and did not encounter the problem there.
Note: in both cases (on Azure and locally) I didn't execute the SetClrEnabled.sql file, because it does not work on Azure.
Versions:
tSQLt: 1.0.5873.27393
Azure DB: Microsoft SQL Azure (RTM) - 12.0.2000.8 Jun 7 2017 01:09:35