Skip to content

Version for package Microsoft.XmlSerializer.Generator could not be resolved. #122719

@alex-jitbit

Description

@alex-jitbit

Description

Updating Microsoft.XmlSerializer.Generator nuget to 10.0.1 results in this error during build.

dotnet restore works fine.

However dotnet build fails:

Version for package `Microsoft.XmlSerializer.Generator` could not be resolved.
    /Users/jazz/.nuget/packages/microsoft.xmlserializer.generator/10.0.1/build/Microsoft.XmlSerializer.Generator.targets(51,5): warning MSB3073: The command "dotnet Microsoft.XmlSerializer.Generator "obj/Debug/net10.0/<redacted>.dll" --force --quiet obj/Debug/net10.0/sgen.rsp" exited with code 1.

Reverting package to to 10.0.0 works fine

Reproduction Steps

Update to 10.0.1

<PackageReference Include="Microsoft.XmlSerializer.Generator" Version="10.0.1" />

Try to build the project.

PS. My project does not have the DotNetCliToolReference various MS sources mention I should remove it, because it's apparently deprecated? Is it deprecated or not?? dotnet/docs#26253 dotnet/sdk#45193 (the reason I removed it was because otherwise serialization assembly would not generate in v10.0.0

Expected behavior

Build should work fine.

Actual behavior

Error above

Regression?

Yes, 10.0.0 works fine.

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions