-
Notifications
You must be signed in to change notification settings - Fork 268
Description
Calling either INuGetProjectManagerService.GetMetadataAsync(...) or INuGetProjectManagerService.TryGetMetadataAsync(...) with NuGetProjectMetadataKeys.TargetFramework over a remote connection will serialize a NuGetFramework instance correctly but will not deserialize on the client as expected.
When the original data type is a built-in primitive (like string with NuGetProjectMetadataKeys.Name), the explicit casts here and here are successful.
However, when the original data type is NuGetFramework, these casts result in an InvalidCastException. Since the deserializer's only hint as to the expected type is object (from the interface method signatures), the deserializer deserializes the NuGetFramework as a dictionary of key-value pairs. NuGetFrameworkFormatter.Deserialize(...) is never called.
Presumably, NuGetProjectMetadataKeys.SupportedFrameworks has a similar problem.