dotnet / dotnet/SqlClient

`PublishSNIFiles` is part of `PublishItemsOutputGroupDependsOn`, but doesn't contribute to `PublishItemsOutputGroupOutputs`

Open
#3,081 0 comments 0 reactions 0 assignees View on GitHub
Area\Native SNI
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 18h
Merged PRs (30d)
69

Description

### Describe the bug

`Microsoft.Data.SqlClient.SNI.targets` adds `PublishSNIFiles` to `PublishItemsOutputGroupDependsOn`, but it doesn't add the published SNI files to `PublishItemsOutputGroupOutputs`.

I can't seem to find the source for this targets file on GitHub, so for reference, here's what it looks like on my local:

```csproj





```

It seems like this target should take the additional step of adding the SNI files to `@(PublishItemsOutputGroupOutputs)` so that downstream targets are aware that these items are part of the published output, e.g.:

```diff


+
+
+

```

### To reproduce

```csproj


net48






<_OrphanedFiles Include="$(PublishDir)/*" Exclude="$(PublishDir)/*.zip" />

```

```console
$ dotnet publish
warning : bin\Debug\net48\publish\Microsoft.Data.SqlClient.SNI.arm64.dll;bin\Debug\net48\publish\Microsoft.Data.SqlClient.SNI.x64.dll;bin\Debug\net48\publish\Microsoft.Data.SqlClient.SNI.x86.dll

Build succeeded with 1 warning(s) in 1.3s

$ ls -1 bin/Debug/net48/publish/
Microsoft.Data.SqlClient.SNI.arm64.dll
Microsoft.Data.SqlClient.SNI.x64.dll
Microsoft.Data.SqlClient.SNI.x86.dll
SomeProject.1.0.0.zip
```

### Expected behavior

```console
$ dotnet publish

Build succeeded in 1.3s

$ ls -1 bin/Debug/net48/publish/
SomeProject.1.0.0.zip
```

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.