• use MSBuild cmd to build and deploy the database project.


    You can use the below command to implement it.

    SET TargetDBName="Database name"
    SET DataBaseServer="DB Server name"
    SET DbProjectPath="database project folder"
    
    
    C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe /t:Deploy /p:TargetDatabase=%TargetDBName%;TargetConnectionString="Data Source=%DataBaseServer%;User ID=XXX;Password=XXX;Pooling=False" "%DbProjectPath%DataBaseProjectName.sqlproj"

    You may need to add a user on the DB server. Then you can connect the database server with it.

    The problem that you may come accross.

    Problem 1: error MSB4019: The imported project "C:Program Files(x86)MSBuildMicrosoftVisualStudiov10.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correc

    t, and that the file exists on disk.

    Solution1:

    Solution2:

    Problem2: Could not load file or assembly 'Microsoft.Data.Tools.Components, Version=10.3.0.0' or one of its dependencies

    Solution1:

    稍后继续。。。

  • 相关阅读:
    带勾选框的组织F4
    VBA 学习
    MACD指标量化策略实战案例
    DOM
    JS基础下
    JS基础
    CSS基础
    html实战4--transform3D
    html实战3--精灵图
    html实战2--四叶草
  • 原文地址:https://www.cnblogs.com/bg57/p/3469613.html
Copyright © 2020-2023  润新知