CLR Deployment Fails
This drove me mad!
I was getting this error:-
Deploy error SQL01268: .Net SqlClient Data Provider: Msg 325, Level 15, State 1, Procedure 'procedurename', Line 5 Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.
Changed everything one at a time and eventually found the solution.
Check your compatibility level in your SQL Database
In my case I found that it was set to 80.
To solve this, it should be 90 or above.
sp_dbcmptlevel 'thedatabasename', 90
Fixed and deployed!
Ric is an MCPD Microsoft Certified Professional Developer with over 25 years commercial development experience using Microsoft technologies.