Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BinaryFormatter obsolete in .NET 8 #998

Open
BertDM opened this issue Nov 5, 2024 · 0 comments
Open

BinaryFormatter obsolete in .NET 8 #998

BertDM opened this issue Nov 5, 2024 · 0 comments

Comments

@BertDM
Copy link

BertDM commented Nov 5, 2024

Describe the bug

Set V1 Task Data (under TaskScheduler/TaskService/Task.cs) still uses BinaryFormatter which is obsolete in .NET 8 as described here: https://learn.microsoft.com/en-us/dotnet/core/compatibility/serialization/8.0/binaryformatter-disabled

	internal static void SetV1TaskData(ITask v1Task, object value)
	{
		if (value == null)
			v1Task.SetWorkItemData(0, null);
		else
		{
			var b = new BinaryFormatter();
			var stream = new MemoryStream();
			b.Serialize(stream, value);
			v1Task.SetWorkItemData((ushort)stream.Length, stream.ToArray());
		}
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant