久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何解決 VS2013 錯誤 SQL71501:過程 X 對程序集 Y 的

How to resolve VS2013 Error SQL71501: Procedure X has an unresolved reference to Assembly Y?(如何解決 VS2013 錯誤 SQL71501:過程 X 對程序集 Y 的引用未解析?)
本文介紹了如何解決 VS2013 錯誤 SQL71501:過程 X 對程序集 Y 的引用未解析?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

作為我們從 Visual Studio 2010 升級到 2013 的努力的一部分,我正在查看幾個需要 EXTERNAL 訪問的 SQL Server CLR 存儲過程,并且為此目的被隔離在一個單獨組裝.我幾乎可以輕松構建所有東西,但這給我帶來了一些麻煩.

As a part of our effort to upgrade from Visual Studio 2010 to 2013, I am looking at a couple of SQL Server CLR stored procedures that need EXTERNAL access, and for this purpose are isolated in a separate assembly. I've got almost everything to build with little difficulty, but this is giving me some trouble.

由于有問題的程序集使用了新的 .sqlproj 項目類型顯然根本不喜歡的 Web 引用,并且為了能夠繼續,我們決定使用 VS2010 SP1 單獨構建該程序集并引用編譯后的 DLL.程序集本身構建得很好,VS2013 對參考本身沒有任何抱怨.

Since the assembly in question uses web references which the new .sqlproj project type apparently does not like at all, and to be able to proceed, we decided to just build that assembly separately using VS2010 SP1 and reference the compiled DLL. The assembly itself builds just fine and VS2013 has no complaints about the reference itself.

SQL CLR SP 的外觀如下(請不要問我分號到底在做什么):

Here's how the SQL CLR SP looks (please don't ask me what on Earth that semicolon is doing there at the end):

using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.IO;
using System.Text;


public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static int SQLCLR1(
        SqlString in1,
        SqlString in2,
        SqlString in3,
        SqlString in4,
        SqlString in5
        )
    {
        // ... code elided ... //
    }
};

和 SQL 端:

CREATE PROCEDURE [dbo].[SQLCLR1]
    @in1 [nvarchar](4000),
    @in2 [nvarchar](4000),
    @in3 [nvarchar](4000),
    @in4 [nvarchar](4000),
    @in5 [nvarchar](4000)
WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [External].[StoredProcedures].[SQLCLR1]
GO

AaronLS 的回答 給出了 AS EXTERNAL NAME 說明符的格式為:

An answer by AaronLS gives the format of the AS EXTERNAL NAME specifier as:

AS EXTERNAL NAME [AssemblyName].[ClassName].[FunctionName]

數據庫項目將程序集引用為External.dll,在VS2010 項目屬性中的Application 下,Assembly name"為External".在 VS2013 端,解決方案資源管理器將引用顯示為簡單的外部",這反映在 SqlServer -> 程序集名稱下的屬性窗口中.

The database project refers the assembly as External.dll, and in VS2010 project properties under Application, "Assembly name" is "External". On the VS2013 side, the Solution Explorer displays the reference as simply "External", and this is mirrored in the Properties window under SqlServer -> Assembly Name.

然而,當我嘗試在 VS2013 端構建數據庫項目時,它會吐出如下錯誤(每個 CLR SP 一個):

Yet, when I try to build the database project on the VS2013 side, it spits out errors like (one for each CLR SP):

12>D:\Source\...\SQLCLR1.proc.sql(9,16): Error:  SQL71501: Procedure: [dbo].[SQLCLR1] has an unresolved reference to Assembly [External].

構建成功缺少什么?

推薦答案

在 VS 2013 端,我不得不將 DLL 引用上的 Model Aware 屬性設置為 True.

On the VS 2013 side, I had to set the Model Aware property on the DLL reference to True.

一旦我這樣做了,構建就成功完成了.

Once I had done that, the build completed successfully.

這篇關于如何解決 VS2013 錯誤 SQL71501:過程 X 對程序集 Y 的引用未解析?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應該使用什么 SQL Server 數據類型來存儲字節 [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
MS SQL: Should ISDATE() Return quot;1quot; when Cannot Cast as Date?(MS SQL:ISDATE() 是否應該返回“1?什么時候不能投射為日期?)
Converting the name of a day to its integer representation(將一天的名稱轉換為其整數表示)
How to convert nvarchar m/d/yy to mm/dd/yyyy in SQL Server?(如何在 SQL Server 中將 nvarchar m/d/yy 轉換為 mm/dd/yyyy?)
主站蜘蛛池模板: 三级黄色片在线 | 欧美国产中文字幕 | 欧美午夜精品理论片a级按摩 | 91久久| 亚洲先锋影音 | 中文字幕在线视频免费视频 | 日本精品一区二区三区在线观看视频 | 看真人视频一级毛片 | 成人免费毛片片v | 精品视频一区二区 | 精品欧美一区二区三区久久久 | 91在线免费观看 | 免费黄色录像片 | 伊人手机在线视频 | 日韩美女爱爱 | 在线观看黄视频 | 亚洲免费精品 | 久久性av | 国产一区二区三区精品久久久 | 亚洲欧美精品国产一级在线 | 国产精品久久久久久亚洲调教 | 一区二区不卡 | 99精品99| 成人av观看| 成年人国产在线观看 | 欧美黄色大片在线观看 | 91国产精品| 九色.com| 毛片一级片| 91久久精 | 日日av| 夜夜艹 | 久草视 | 激情自拍偷拍 | 日韩中文字幕一区 | 91久久久精品国产一区二区蜜臀 | 日韩精品在线看 | 午夜视频在线播放 | 日本午夜精品 | 久久新 | 中文字幕在线一区二区三区 |