microsoft / DacFx

DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.
https://aka.ms/sqlpackage-ref
MIT License
347 stars 20 forks source link

IncludeFileNamesCollector doesn't work cross-platform #397

Open jmezach opened 4 years ago

jmezach commented 4 years ago

I've been working on an open source project called MSBuild.Sdk.SqlProj which allows defining SSDT like projects using the simplified SDK-style project files while also enabling support for building .dacpac's cross-platform.

One of the things that has been requested is support for merging pre- and/or post-deployment scripts into a single file (see jmezach/MSBuild.Sdk.SqlProj#23), which can then be packaged into the resulting .dacpac. I've looked at how this works in Visual Studio and that seems to rely on the IncludeFileNamesCollector from the Microsoft.Data.Tools.Schema.Sql.Deployment namespace in the Microsoft.Data.Tools.Schema.Sql assembly. This type parses the SQL scripts and resolves imported scripts (using the :r OtherScript.sql syntax), which is exactly what I need.

Now I know that this is an internal type, but I'd rather not re-invent the wheel so I'm using reflection to use it. However, I'm running into an issue where this type is normalizing paths to be all uppercase. That works just fine on Windows of course, but not so much on operating systems that have a case sensitive file systems (like Linux).

Not sure if this is the right place, but I'm wondering if there's something that can be done here so that I can unblock my users. The assembly I'm using is part of the Microsoft.SqlServer.DACFX NuGet package.

zijchen commented 1 month ago

I believe this was fixed some time in 2021. Can you verify that this is fixed?