Skip to content

SqlTargetName only resolves in current project not any project references #779

@buvinghausen

Description

@buvinghausen
  • SqlPackage or DacFx Version: Microsoft.Build.Sql 2.1.0
  • .NET Framework (Windows-only) or .NET Core: .NET 10.0 all platforms
  • Environment (local platform and source/target platforms): Azure & Windows local

Steps to Reproduce:

  1. Define Directory.Build.props in the parent folder with
<SqlTargetName>MyNamespace.$(MSBuildProjectName)</SqlTargetName>
  1. Define two Microsoft.Build.Sql sqlproj folders as siblings I choose Parent/Child for clarity in the child
<ItemGroup>
	<ProjectReference Include="..\Parent\Parent.sqlproj" />
</ItemGroup>
  1. Run dotnet build on the child

.nuget\packages\microsoft.build.sql\2.1.0\tools\net8.0\Microsoft.Data.Tools.Schema.SqlTasks.targets(558,5): Build error SQL72027: File "Parent\bin\Release\Parent.dacpac" does not exist.

That's because it is now MyNamespace.Parent.dacpac when it built

Did this occur in prior versions? If not - which version(s) did it work in?

Not sure just started using 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: build sdkRelated to Microsoft.Build.Sql SDKbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions