.NET SqlMembershipProvider 的架构错误
- Visual Studio 2010 Ultimate
- MS SQL Server 2008
- 默认 .NET SqlMembershipProvider(aspnet_Users、aspnet_Membership 等...)
我设置了一个数据库项目,以保持数据库在环境之间同步并保持版本控制。该数据库包含我创建的几个简单表,以及运行 aspnet_regsql.exe
工具时获得的 SqlMembership 提供程序的默认安装。我执行了从数据库到数据库项目的架构比较,VS 生成了所有脚本。伟大的。
但是,我收到了一堆错误,这些错误破坏了有关 aspnet_regsql
工具创建的某些对象的构建。
Schema: [aspnet_WebEvent_FullAccess] has an unresolved reference to object [aspnet_WebEvent_FullAccess].
Schema: [aspnet_Membership_BasicAccess] has an unresolved reference to object [aspnet_Membership_BasicAccess].
Schema: [aspnet_Membership_FullAccess] has an unresolved reference to object [aspnet_Membership_FullAccess].
Schema: [aspnet_Membership_ReportingAccess] has an unresolved reference to object [aspnet_Membership_ReportingAccess].
Schema: [aspnet_Personalization_BasicAccess] has an unresolved reference to object [aspnet_Personalization_BasicAccess].
Schema: [aspnet_Personalization_FullAccess] has an unresolved reference to object [aspnet_Personalization_FullAccess].
Schema: [aspnet_Personalization_ReportingAccess] has an unresolved reference to object [aspnet_Personalization_ReportingAccess].
Schema: [aspnet_Profile_BasicAccess] has an unresolved reference to object [aspnet_Profile_BasicAccess].
Schema: [aspnet_Profile_FullAccess] has an unresolved reference to object [aspnet_Profile_FullAccess].
Schema: [aspnet_Profile_ReportingAccess] has an unresolved reference to object [aspnet_Profile_ReportingAccess].
Schema: [aspnet_Roles_BasicAccess] has an unresolved reference to object [aspnet_Roles_BasicAccess].
Schema: [aspnet_Roles_FullAccess] has an unresolved reference to object [aspnet_Roles_FullAccess].
Schema: [aspnet_Roles_ReportingAccess] has an unresolved reference to object [aspnet_Roles_ReportingAccess].
对我来说,它们看起来都很循环。我该如何消除这些错误?如果我无法摆脱它们,我可以将它们从模式比较中全部排除吗?如何?
提前致谢!
- Visual Studio 2010 Ultimate
- MS SQL Server 2008
- Default .NET SqlMembershipProvider (aspnet_Users, aspnet_Memmbership, etc...)
I set up a database project to keep the database synced between environments and keep it versioned. The database has a few simple tables I created and then the default installation of the SqlMembership provider that one gets when running the aspnet_regsql.exe
tool. I performed a schema comparison from the database to the database project and VS generated all the scripts. Great.
However, I am getting a bunch of errors that break the build regarding some of the objects that the aspnet_regsql
tool created.
Schema: [aspnet_WebEvent_FullAccess] has an unresolved reference to object [aspnet_WebEvent_FullAccess].
Schema: [aspnet_Membership_BasicAccess] has an unresolved reference to object [aspnet_Membership_BasicAccess].
Schema: [aspnet_Membership_FullAccess] has an unresolved reference to object [aspnet_Membership_FullAccess].
Schema: [aspnet_Membership_ReportingAccess] has an unresolved reference to object [aspnet_Membership_ReportingAccess].
Schema: [aspnet_Personalization_BasicAccess] has an unresolved reference to object [aspnet_Personalization_BasicAccess].
Schema: [aspnet_Personalization_FullAccess] has an unresolved reference to object [aspnet_Personalization_FullAccess].
Schema: [aspnet_Personalization_ReportingAccess] has an unresolved reference to object [aspnet_Personalization_ReportingAccess].
Schema: [aspnet_Profile_BasicAccess] has an unresolved reference to object [aspnet_Profile_BasicAccess].
Schema: [aspnet_Profile_FullAccess] has an unresolved reference to object [aspnet_Profile_FullAccess].
Schema: [aspnet_Profile_ReportingAccess] has an unresolved reference to object [aspnet_Profile_ReportingAccess].
Schema: [aspnet_Roles_BasicAccess] has an unresolved reference to object [aspnet_Roles_BasicAccess].
Schema: [aspnet_Roles_FullAccess] has an unresolved reference to object [aspnet_Roles_FullAccess].
Schema: [aspnet_Roles_ReportingAccess] has an unresolved reference to object [aspnet_Roles_ReportingAccess].
They all seem pretty circular to me. How do I get rid of these errors? If I cant get rid of them, can I exclude them from my schema comparison all together? How?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜测左侧的项目是架构,右侧的项目是具有匹配名称的匹配数据库角色,因此虽然它看起来是圆形的,但它们实际上是不同的对象。
如果您查看数据库 -> 安全 -> 角色,然后查看模式,您会看到这两组吗?
您在数据库项目中是否同时拥有数据库角色和架构?可能是您已将模式与数据库同步,但没有与角色同步?您要么都不需要,要么两者都不需要。
如果您不想将权限更改部署到数据库,则可以在
.sqldeployment
设置中选择IgnorePermissions
。如果您没有在数据库项目中同步权限,但想要删除目标数据库中不在模型中的所有其他内容(.sqldeployment
GenerateDropsIfNotInProject),这可能会很有用>)希望这有帮助
I'm guessing the items on the left are Schemas and the ones on the right are the matching Database Roles with matching names, so although it looks circular they are actually different objects.
If you look in your database->Security->Roles and then Schemas do you see both sets?
Do you have both database roles and the schemas in the database project? It could be that you've the schemas synced with the database but not the roles? You'll either need neither or both.
There's an option to
IgnorePermissions
in the.sqldeployment
settings if you don't want to deploy permission changes to the DB. This could be useful if you don't have permissions synced in your db project, but want to drop everything else in the target DB that's not in the model (GenerateDropsIfNotInProject
in.sqldeployment
)Hope this helps