SQL 71501 有一个未解析的程序集引用 [英] SQL 71501 has an unresolved assembly reference

查看:33
本文介绍了SQL 71501 有一个未解析的程序集引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 Visual Studio 2015 和目标平台设置为 SQL Server 2008 的情况下使用 SSDT 工具.我们坚持使用此函数,它会引发错误,需要帮助我们如何修复它.

We are using SSDT tools with Visual Studio 2015 and Target Platform set to SQL Server 2008. We are stuck with this function which is throwing an error and need assistance on what we can do to fix it.

 SQL71501: Function: [dbo].[GetFormattedAddress] has an unresolved reference to Assembly [AddressFormatting]


 CREATE FUNCTION [dbo].[GetFormattedAddress]
 (@AddressID INT, @CompleteAddress BIT)
RETURNS NVARCHAR (4000)
AS
EXTERNAL NAME [AddressFormatting].[AddressFormatting.UserDefinedFunctions].[GetFormattedAddress]

GO

--更新

在Assemblies 文件夹下,对于AddressFormatting.dll,我将BuildAction 设置为Build,然后在References 下我设法看到了我现在已设置为True 的Model Aware 属性.在此之后,我收到以下错误:

Under the Assemblies folder, for AddressFormatting.dll, i set the BuildAction to Build and then under the References i managed to see the Model Aware property which i have now set to True. After this now i get the following error:

SQL46010:

它指向错误的文件是 AddressFormatting.dll

The file where it's pointing the error is AddressFormatting.dll

推荐答案

我也遇到了这个问题,通过将 Visual Studio 中的 SQL 兼容级别更改为 2012,重新编译项目,然后将其更改回兼容级别,它神秘地解决了2008年然后做一个干净的项目,然后重新编译.

I also had this issue and it was resolved mysteriously by changing the SQL compatiblity level in Visual Studio to 2012, recompiling the project and then changing it back to compatibility level of 2008 and then do a clean project and then recompile.

这篇关于SQL 71501 有一个未解析的程序集引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆