You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Microsoft.XmlSerializer.Generator package should cause an XML serialization assembly to be generated on build. However, on a machine with a 2.0.x (e.g. 2.0.9) .NET core runtime installed, it fails with the following:
Method 'System.Xml.Serialization.XmlSerializer.GenerateSerializer' was not found. This is likely because you are using an older version of the framework. Please update to .NET Core v2.1 or later.
Sgen utility failed to pregenerate serialization code for d:\src\dump\Microsoft.XmlSerializer.Generator.Fail\Microsoft.XmlSerializer.Generator.Fail\obj\Debug\netstandard2.0\Microsoft.XmlSerializer.Generator.Fail.dll.
C:\Users\Oliver.nuget\packages\microsoft.xmlserializer.generator\2.2.0\build\Microsoft.XmlSerializer.Generator.targets(38,5): warning : SGEN: Failed to generate the serializer for Microsoft.XmlSerializer.Generator.Fail.dll. Please follow the instructions at https://go.microsoft.com/fwlink/?linkid=858594 and try again.
This can be reproduced easily with the following project file:
The Microsoft.XmlSerializer.Generator package should cause an XML serialization assembly to be generated on build. However, on a machine with a 2.0.x (e.g. 2.0.9) .NET core runtime installed, it fails with the following:
This can be reproduced easily with the following project file:
and this code:
It seems as though this is caused by incorrect values in https://github.com/dotnet/runtime/blob/master/src/libraries/Microsoft.XmlSerializer.Generator/pkg/build/dotnet-Microsoft.XmlSerializer.Generator.runtimeconfig.json:
As per the error message, the required runtime is 2.1.x.
The text was updated successfully, but these errors were encountered: