简体   繁体   中英

VS 2010 Database Project: Which determines sql03006 or sql04151

I am still researching, but I have not been able to figure this out.

I reverse engineered a project from one database and all my unresolved references came through as SQL03006 errors that kill the build. I reverse engineered a different database and all the unresolved references came through as SQL04151 warnings that let me proceed.

I don't have the "treat warnings as errors" box checked.

I think I created 1 via wizard and the other manually, so still researching. But if anyone has an idea, I would appreciate the help!

Have you tried adding a Database Reference that points to dbschema files for the other databases referenced? You can use VSDBCMD.exe to create those files. Someone wrote up a GUI that may work for this at: http://www.benday.com/2009/08/22/a-user-interface-for-vsdbcmd-deployimport-your-database-schema-without-installing-visual-studio-2008-database-edition/

The general syntax for the command is something like this:

VSDBCMD /a:Import /cs:" ConnectionString" /dsp:Sql /model:DatabaseName.dbschema

You can find more details on VSDBCMD at: http://msdn.microsoft.com/en-us/library/dd193283%28v=VS.100%29.aspx

In our case, we put any shared schema files in a folder that can be accessed by all projects that need them. Once added as a database reference, you should be able to build/deploy without the errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM