Comments (6)
@ChristopherHaws Thanks for reporting this. We've had a few similar issues, such as #63. I remember looking at the up-to-date document back then, but couldn't figure out why it wouldn't work at the time as we didn't have too much to go on.
This output helps, although it is interesting to see such a huge time difference between those two files. Can you consistently reproduce this? If so, it would be really helpful to have a binary log of both the initial build and the incremental build.
from msbuild.sdk.sqlproj.
I was able to achieve this by adding the following to the csproj file:
<ItemGroup>
<UpToDateCheckInput Include="**/*.sql" />
</ItemGroup>
from msbuild.sdk.sqlproj.
@ChristopherHaws Did you try @zlatanov suggestion above?
from msbuild.sdk.sqlproj.
Just to add info that might or might not help. I do something similar to what @zlatanov suggests but referring to the files in the original project with the UpToDateCheckInput like this:
<Project Sdk="MSBuild.Sdk.SqlProj/2.5.0">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<SqlServerVersion>Sql140</SqlServerVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DeployOnPublish>false</DeployOnPublish>
<OutputPath>bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<UpToDateCheckInput Include="../MyAppDatabase/**/*.sql" />
</ItemGroup>
<ItemGroup>
<Content Include="../MyAppDatabase/**/*.sql" />
<Content Remove="../MyAppDatabase/bin/**" />
<Content Remove="../MyAppDatabase/obj/**" />
<Content Remove="../MyAppDatabase/Deployment/**" />
<Content Remove="../MyAppDatabase/Security/Users/**" />
</ItemGroup>
</Project>
I've fiddled a bit with different options but got this to work. On the other end referring to the MSBuild.Sdk.SqlProj/2.5.0-project from other projects without explicitly linking the dacpac seems to also require an UpToDateCheck on the referring projects like this:
<ItemGroup>
<UpToDateCheckBuilt Include="$(OutDir)MyAppDatabase.Build.dacpac" Original="../MyAppDatabase.Build/bin/MyAppDatabase.Build.dacpac" />
</ItemGroup>
from msbuild.sdk.sqlproj.
@ChristopherHaws any news?
from msbuild.sdk.sqlproj.
@ErikEJ Sorry, I have been super busy with other things. I can try to change sometime this week and I will get back to you. Sorry about the long response! ^_^
from msbuild.sdk.sqlproj.
Related Issues (20)
- Let configure packing dacpac with required nuspec next to csproj HOT 1
- Allow overriding dacpac filename for a package reference HOT 10
- Question: Error SQL72033 when using sqlpackage /Action: Script HOT 7
- Remove support for .NET Core 3.1 builds
- The current SDK bundles target framework '8.0' which is not supported by MSBuild.Sdk.SqlProj HOT 3
- Changes from one project are not reflected in other projects after build HOT 1
- Referencing MSSQL master dacpacs no longer accurate HOT 7
- Issue downloading from nuget... HOT 4
- Defining SQLCMD variables in the project prevents them from being set via environment variables
- [Question] Is there any plan to add unit testing capabilities to this project? HOT 1
- Escaping SQLCMD values that contain complex strings HOT 6
- Build warnings in latest VS HOT 3
- How to reference sql scripts from nuget in Post Deployment Script HOT 2
- Store procedure is not added as part of DACPAC HOT 1
- Dacpac Version HOT 1
- How can you include a script file with external references that aren't referencable? HOT 5
- EXEC warning SQL73162 --> Option TrustServerCertificate is missing HOT 2
- Support for linked servers HOT 5
- Referencing Microsoft.SqlServer.Dacpacs.Master fails HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.sdk.sqlproj.