I have a Visual StudioVisual Studio
solution where I manage nugetNuGet
packages globally with a Packages.propsPackages.props
file. I have a filesystem publishprofile. Now I added a reference to the nugetNuGet
package System.Diagnostics.DiagnosticSourceSystem.Diagnostics.DiagnosticSource
. When I publish the project, the System.Diagnostics.DiagnosticSource.dllSystem.Diagnostics.DiagnosticSource.dll
is not in the bin-folderBin
folder of the publish directory. Other nugetNuGet
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.