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
313 stars 19 forks source link

Support UseArtifactsOutput in .NET 8 #446

Open benjamin-hodgson opened 4 months ago

benjamin-hodgson commented 4 months ago

I have a repository with two files: a Directory.Build.props with an opt-in for the new UseArtifactsOutput feature in .NET 8,

<!-- Directory.Build.props -->

<Project>
    <PropertyGroup>
        <UseArtifactsOutput>true</UseArtifactsOutput>
    </PropertyGroup>
</Project>

and a sqlproj file in a subfolder:

<!-- MyDb/MyDb.sqlproj -->
<Project Sdk="Microsoft.Build.Sql/0.1.15-preview">
    <PropertyGroup>
        <Name>MyDb</Name>
        <DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
        <ModelCollation>1033, CI</ModelCollation>
    </PropertyGroup>
</Project>

When I build the sqlproj (using dotnet build MyDb), the output dacpac goes into the old-style output location, MyDb/bin/Debug/MyDb.dacpac. It should go into the artifacts folder (ie artifacts/bin/MyDb/Debug/MyDb.dacpac) instead.

Thanks!