Git Product home page Git Product logo

Comments (7)

ErikEJ avatar ErikEJ commented on May 23, 2024 1

Please share your project (at least options)

from msbuild.sdk.sqlproj.

jmezach avatar jmezach commented on May 23, 2024 1

I would expect the original .sqlproj to fail with the same error actually, since both project file formats should be using the same SQL parser. Unless the offending file is not part of the build in the original .sqlproj. What is the build action for that file?

Either way I don't think there's much we can do here if the parser doesn't support it. I checked if there's an update to the NuGet package we're using, but alas there's no newer stable version.

@ErikEJ I've added the suggested workarounds to the README so I think we can go ahead and close this.

from msbuild.sdk.sqlproj.

timabell avatar timabell commented on May 23, 2024

The work in progress is here: https://github.com/SkillsFundingAgency/dfc-coursedirectory/blob/linux-builds/src/Dfc.CourseDirectory.Database.Build/Database.Build.csproj (work in progress branch, may disappear later)

It pulls in https://github.com/SkillsFundingAgency/dfc-coursedirectory/tree/cd887928fb48e08cafcd8c34eac8d207ebe283f0/src/Dfc.CourseDirectory.Database

from msbuild.sdk.sqlproj.

jmezach avatar jmezach commented on May 23, 2024

I had a look around and according to this post it seems that it is also an issue with the existing .sqlproj format. @timabell Does the .sqlproj compile as it is, or does it give you the same error?

The post linked above suggests to use dynamic SQL to resolve it, although that is of course less ideal.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on May 23, 2024

Or maybe move the offending script to PostDeployment with "CREATE OR UPDATE" ?

from msbuild.sdk.sqlproj.

timabell avatar timabell commented on May 23, 2024

@jmezach The visual studio sqlproj does compile and create a dacpac, yes.

I tried the dynamic sql option and that indeed get past the error though at a cost of the ability of tooling to analyse the file.

I've realised I probably don't actually need that script in the linux build of the dacpac for local development at the moment so I've altered my linux build csproj to not include the problematic folder and now have a successful build. Thanks for your help on this.

@ErikEJ thanks for the suggestion, I didn't get as far as trying it.

I don't know if it makes sense to keep this issue open as I'm not that familiar with dacpacs and don't know if a database restore would be a normal thing to keep in them. I may return here if I end up needing it as part of the build setup later.

Thanks again, very grateful for the quick and helpful responses.

from msbuild.sdk.sqlproj.

ErikEJ avatar ErikEJ commented on May 23, 2024

Agree, not something this project can fix - we should keep eyes on updates to the NuGet pckage, but I do that regularly anyway for EF Core Power Tools.

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.