Skip to content

dotnet pack doesn't include xmlserializer assembly #2202

@Styxxy

Description

@Styxxy

When forcing assembly to generate XmlSerializer assembly,when packing the project, this XmlSerializer assembly is not included in the nupkg.

Project file:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net47</TargetFramework>
    <GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
    <SGenUseProxyTypes>false</SGenUseProxyTypes>
  </PropertyGroup>

</Project>

command dotnet pack myproject.csproj generates following nuspec (in the obj folder):

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>myproject</id>
    <version>1.0.0</version>
    <authors>myproject</authors>
    <owners>myproject</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Package Description</description>
    <dependencies>
      <group targetFramework=".NETFramework4.7" />
    </dependencies>
  </metadata>
  <files>
    <file src="c:\users\styxxy\Source\Repos\myproject\myproject\bin\Debug\net47\myproject.dll" target="lib\net47\myproject.dll" />
  </files>
</package>

I would expect the XmlSerializer assembly to be included as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions