dotnet / dotnet/SqlClient

Microsoft.Data.SqlClient.SNI files ends up in root folder

Open
#3,525 6 comments 0 reactions 1 assignee Claimed by @cheenamalhotra View on GitHub
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 19h
Merged PRs (30d)
72

Description

### Describe the bug
It seems that when you

use the OutDir property, it doesn't copy the files to the correct location, but i ends up in the root folder instead

```
Target CopySNIFiles:
Building target "CopySNIFiles" completely.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.arm64.dll" does not exist.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.arm64.pdb" does not exist.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.x64.dll" does not exist.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.x64.pdb" does not exist.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.x86.dll" does not exist.
Output file "..\binapp\Microsoft.Data.SqlClient.SNI.x86.pdb" does not exist.
Task "Copy"
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.arm64.dll" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.arm64.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.arm64.pdb" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.arm64.pdb".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x64.dll" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.x64.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x86.dll" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.x86.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x64.pdb" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.x64.pdb".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x86.pdb" to "C:\Projects\MSClientNuget\binapp\Microsoft.Data.SqlClient.SNI.x86.pdb".
Done executing task "Copy".
Target _CopySNIWebApplicationLegacy:
Task "Copy"
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.arm64.dll" to "C:\bin\Microsoft.Data.SqlClient.SNI.arm64.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x64.dll" to "C:\bin\Microsoft.Data.SqlClient.SNI.x64.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x86.dll" to "C:\bin\Microsoft.Data.SqlClient.SNI.x86.dll".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x86.pdb" to "C:\bin\Microsoft.Data.SqlClient.SNI.x86.pdb".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.x64.pdb" to "C:\bin\Microsoft.Data.SqlClient.SNI.x64.pdb".
Copying file from "C:\Users\xxx\.nuget\packages\microsoft.data.sqlclient.sni\6.0.2\buildTransitive\net462\Microsoft.Data.SqlClient.SNI.arm64.pdb" to "C:\bin\Microsoft.Data.SqlClient.SNI.arm64.pdb".
Done executing task "Copy".

```

### To reproduce
I have attached a solution, which can be used for reproducing the issue
[MSClientNuget.zip](https://github.com/user-attachments/files/21484820/MSClientNuget.zip)

### Expected behavior
I expect it to end up in the outdir instead of the root folder

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.