VS2010 - SQL CRL 部署错误 - 部署错误 SQL04105:模型已具有同名的元素

发布于 2024-09-25 05:49:57 字数 407 浏览 1 评论 0原文

我在 VS2010 中创建了一个 SQL CLR 项目。它需要运行 PreDeployScript.sql 和 PostDeployScript.sql。这两个文件都存在于项目中。但是,当尝试运行部署时,我收到以下错误消息:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlClr.targets(96,5):部署错误 SQL04105:模型已有一个元素具有相同的名称 dbo.PropertySetCollection。

对于我们拥有的每种类型,都会重复此消息。这让我相信 PreDeployScript.sql 没有运行。 还有其他人遇到过这个问题吗?有解决方法吗?

I have a SQL CLR project created in VS2010. It needs to run PreDeployScript.sql and PostDeployScript.sql. Both files exist in project. However, when trying to run the deploy, I get the following error messages:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlClr.targets(96,5): Deploy error SQL04105: The model already has an element that has the same name dbo.PropertySetCollection.

This message is repeated for every single type we have. This leads me to believe that PreDeployScript.sql was not run.
Has anybody else run into this issue? Is there a workaround?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一场信仰旅途 2024-10-02 05:49:57

确保您没有更改解决方案名称。如果有的话,您现在将与 SQL Server 上的程序集名称不同步。要解决此问题,只需删除现有程序集的所有存储过程,删除程序集,然后再次尝试部署。将在 SQL Server 上创建一个新程序集,其解决方案名称为 VS 中的名称。

Make sure you have not changed the Solution name. If you have you will now be out of sync with the assembly name on the SQL Server. To fix this just drop all the stored procedures for the existing assembly, drop the assembly, then try the deploy again. A new assembly will be created on SQL Server with the Solution name that is in VS.

忘羡 2024-10-02 05:49:57

这是VS2010 SQL CLR部署中的一个错误。它与在部署前/部署后脚本中删除/添加计算列有关。 MS 正在研究解决方案。

It is a bug in VS2010 SQL CLR deployment. It has do to with dropping / adding computed columns in pre/post deploy scripts. MS is working on a solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文