I am trying to use the [Serializable] attribute in a C# class library project (latest .NET version), but it is not recognised.
As far as I could search, Serializable it something that belongs in System.Runtime.Serialization System, but I have used it and it still doesn't work.
I am using it in other projects (Unity), but it doesn't work here. Any ideas?
using System;
using System.Runtime;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Collections.Generic;
namespace Model{
[Serializable]
public struct GameSettings{
public int Players;
}
}
Thank you in advance
Edit: format Edit2: screenshot of the error