Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8180023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:07:38+00:00 2026-06-07T00:07:38+00:00

My database project needs to include a SQL file with a command that will

  • 0

My database project needs to include a SQL file with a command that will be run manually in another server in order to create a linked server to this one. I wish that this file would be parsed by the VSDBCMD and copied into the output folder with its variables set.

The only think I’ve been able to do is to have it copied into the output folder selecting for the Copy to Output Directory option Copy Always, but the file is not parsed by the VSDBCMD so its variables have no value.

Any clue?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:07:40+00:00Added an answer on June 7, 2026 at 12:07 am

    Two options:

    Add a deploy target to Database Project file

    Configure the deployment settings for ‘My project settings’. Those settings will then be used by the build server when building the solution. When building locally, the settings used will be the ones from ‘My isolated development environment’.

    1- In the database project properties

    Deploy Action needs to be set to ‘Create a deployment script (.sql) and deploy the database’; this will prevent the execution of the script, it will only create it.

    2- Database project file

    Modify the database project file (right-click database project, select Unload, right-click again, select Edit [ProjectName].dbproj)
    from

    <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
    

    To

    <Project DefaultTargets="Build;Deploy" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
    

    When the Build server builds the solution containing the database project, adding the default targets will also deploy the database. This build will use the Deploy settings selected for ‘My project settings’.

    Pros
    – Easy to set up

    Cons
    – Developer have to manage their own Isolated development environment
    settings

    Add to the Build Template an Invoke Process invoking vsdbcmd

    Follow this procedure: http://msdn.microsoft.com/en-us/library/ff805001.aspx

    Pros
    – Developer don’t have to manage their own Isolated development
    environment settings

    Cons
    – Each time a variable is added or removed to the database project, the
    build template or build definition needs to be modified to reflect
    those changes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created SQL Server 2008 Database project using visual studio 2010. after build
I'm working on a project where a Postgresql database needs to be shared across
I have created a database with 8 tables in SQL Server Management Studio on
I need to create an application for the iPhone that will connect to a
I have a C#/ASP.net project has included a database that I have developed that
I have a relational database with about 15 tables that will be used in
I store all of my T-SQL DDL statements in a Visual Studio database project
I'm trying to reverse engineer my database via the SQL Server Wizard in the
My VS2010 database deploy is failing on my build server, which has SQL Server
In the project I need to cache the database data fetched from each request.So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.