SqlTargetName only resolves in current project not any project references
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
- 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
```xml
MyNamespace.$(MSBuildProjectName)
```
2. Define two Microsoft.Build.Sql sqlproj folders as siblings I choose Parent/Child for clarity in the child
```xml
```
3. 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the child build from the issue using the sibling Parent.sqlproj reference and the Directory.Build.props setting. Inspect Microsoft.Data.Tools.Schema.SqlTasks.targets around line 558 and compare the expected Parent.dacpac path with the generated MyNamespace.Parent.dacpac; done means dotnet build resolves the referenced renamed dacpac successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100