gpt4 book ai didi

sql-server - Visual Studio .sqlproj 始终构建

转载 作者:行者123 更新时间:2023-12-04 18:25:09 24 4
gpt4 key购买 nike

当我在 Visual Studio 解决方案中有一个 SQL Server 数据库项目 ( .sqlproj ) 时,我注意到每次构建解决方案时总是会构建该特定项目,即使项目文件没有更改。

这与正常不一致 C#项目( .csproj )只有在有任何文件发生更改时才会构建。

我试过启动 msbuild输出冗长,似乎总是在没有特殊原因的情况下构建该项目。

有什么原因.sqlproj总是建?有没有办法让它只在文件更改时构建?

最佳答案

MSBuild有机会做Incremental Build .其主要思想如下:

MSBuild attempts to find a 1-to-1 mapping between the values of these attributes. If a 1-to-1 mapping exists, MSBuild compares the time stamp of every input item to the time stamp of its corresponding output item. Output files that have no 1-to-1 mapping are compared to all input files. An item is considered up-to-date if its output file is the same age or newer than its input file or files.



我不知道 *.sqlproj 文件中有哪些目标,因此您需要确定它是否曾经使用过该技术,如果确实使用过 - 您需要检查所涉及的输入和输出,并尝试自己澄清,他们在幕后发生了什么。

关于sql-server - Visual Studio .sqlproj 始终构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32558329/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com