How to execute SQLCLR UDF added directly to SSDT sqlproj and resolve reference error SQL71501
问题 I have been trying to find the answer to this simple question - but so far couldn't figure it out. Let say I have MyDb.sqlproj, with various sql content (sprocs, views, trigger, etc). I have added a new UDF through Add-> New item -> SQL CLR C#, User Defined Function. For example: namespace MyNameSpace { public class MyClass { [SqlFunction(DataAccess = DataAccessKind.Read)] //I use different attributes here, but it doesn't matter public static int Method1() { return 0; } } } In MyDb.sqlproj