Comments (7)
Please share your project (at least options)
from msbuild.sdk.sqlproj.
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.
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)
from msbuild.sdk.sqlproj.
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.
Or maybe move the offending script to PostDeployment with "CREATE OR UPDATE" ?
from msbuild.sdk.sqlproj.
@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.
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)
- EXEC warning SQL73162 --> Option TrustServerCertificate is missing HOT 2
- Support for linked servers HOT 5
- Referencing Microsoft.SqlServer.Dacpacs.Master fails HOT 5
- Referencing projects through `.sqlproj` files HOT 2
- Unable to drop tables, functions and procedures HOT 3
- Unrecognized command or argument '-p:UseSharedCompilation=false' when running on Github build HOT 9
- The SDK 'MSBuild.Sdk.SqlProj/2.6.1' specified could not be found HOT 3
- Enable marking individual static analyzer rules as error (instead of warning)
- Latest release notes lack some details (unlike previous) HOT 2
- Error MSB4018: System.NullReferenceException for an OpenJson operation HOT 2
- Add ability to update current rules or bring your own HOT 6
- Problem with CodeAnalysisRules when using ";" (semicolon) HOT 1
- Enable code analysis by default in the templates HOT 2
- SqlServer.Rules has false positive: SRD0200 HOT 1
- SqlServer.Rules has false positive: SRP0020 HOT 1
- Enable analyzer build warnings as errors to be based on a wildcard HOT 5
- Improve .csproj editing experience
- SQLPackage publish is not working in linux, dacpac built with sqlproject have absolute path to referenced dacpacs HOT 2
- After Upgrade to 2.7.x unrelated csharp diagnostic errors for sql code HOT 4
- Schema project is not taken into account during script creation HOT 36
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.