I have a Visual Studio
solution where I manage NuGet
packages globally with a Packages.props
file. I have a filesystem publishprofile. Now I added a reference to the NuGet
package System.Diagnostics.DiagnosticSource
. When I publish the project, the System.Diagnostics.DiagnosticSource.dll
is not in the Bin
folder of the publish directory. Other NuGet
packages work as expected, so I assume that this has to do with the fact that we have a System. assembly here.
I tried things like:
<ItemGroup>
<None Update="bin\System.Diagnostics.DiagnosticSource.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
and
<Target Name="DiagFile">
<ItemGroup>
<_CustomFiles Include="bin\System.Diagnostics.DiagnosticSource.dll" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)
</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
but it doesn't work.