Visual Studio .sqlproj always built
Asked Answered
W

1

7

When I have an SQL Server Database project (.sqlproj) in Visual Studio solution, I notice that that particular project always gets built every time I build the solution even though there is no change in the project files.

This is inconsistent with normal C# project (.csproj) that only gets built when there is any file that changes.

I have tried cranking up the msbuild output verbosity, and it seems to always build that project without special reason.

Is there a reason why .sqlproj is always built? Is there a way to make it build only when file changes?

Wellpreserved answered 14/9, 2015 at 6:16 Comment(3)
Any luck on finding out why?Paginal
No idea yet. There doesn't seem to anything suspicious in the .sqlproj. My files are just plain <Include>. There are no extra build action as well ...Wellpreserved
Near as I can tell, this happens because SSDT SqlProj is a bad product that works poorly.Earleneearley
W
0

MSBuild has the opportunity to make Incremental Build. The main idea of that is the following:

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.

I don't know which targets are inside the *.sqlproj file, so you need to determine does it ever uses that technology, and if it do use - you need to examine which inputs and outputs involved, and try to clarify it by yourself, what is going on with them under the hood.

Wert answered 21/9, 2015 at 8:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.