Git Product home page Git Product logo

Comments (6)

jmezach avatar jmezach commented on June 7, 2024

@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.

zlatanov avatar zlatanov commented on June 7, 2024

I was able to achieve this by adding the following to the csproj file:

<ItemGroup>
        <UpToDateCheckInput Include="**/*.sql" />
</ItemGroup>

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on June 7, 2024

@ChristopherHaws Did you try @zlatanov suggestion above?

from msbuild.sdk.sqlproj.

asbjornb avatar asbjornb commented on June 7, 2024

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.

ErikEJ avatar ErikEJ commented on June 7, 2024

@ChristopherHaws any news?

from msbuild.sdk.sqlproj.

ChristopherHaws avatar ChristopherHaws commented on June 7, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.