2

I have a solution with two projects. The first is a basic class library project containing the definition of classes shared between several service endpoints (DataContract.dll). The second is a SQL CLR project that will use the classes defined in the shared assembly. On my local machine I can register this assembly with local instance of SQL Server, add a reference to the assembly, and compile. However, when I commit this code to our build machine the assembly is not registered on the server. I could manually register the assembly on the build server, but this won't help new developers who join the project and have a broken build on their first check-out. Also, our build server chooses a random name for the temporary directory it builds in, so the reference on the build server's database instance may be stale or missing. Is there any way to reference the shared library project from my SQL CLR project such that the build server and new developers will always have a good build?

4

1 に答える 1

0

以前も同じ問題がありましたが、必ずしも SQLCLR だけではありませんでした。これを行う最善の方法は、独自の NuGet サーバーを作成することであることがわかりました。これが複雑に思える場合、またはリソースがない場合は、共有されているライブラリの unc 共有のみを使用することをお勧めします。バイナリをローカルで正常にコンパイルした後、バイナリを unc パスにコピーするビルド後のスクリプトを作成できます。

于 2015-10-13T13:51:34.273 に答える