Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

Microsoft assembly not copied to publishfolderpublish folder

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.

Microsoft assembly not copied to publishfolder

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.

Microsoft assembly not copied to publish folder

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.

Source Link
staccata
  • 553
  • 3
  • 15

Microsoft assembly not copied to publishfolder

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.