diff --git a/Iced/Iced.csproj b/Iced/Iced.csproj index 91a32f4af..f96d0493e 100644 --- a/Iced/Iced.csproj +++ b/Iced/Iced.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;netstandard2.0;net452 + netstandard2.0;netstandard1.4;net452 true @@ -50,7 +50,8 @@ License: MIT - $(DefineConstants);HAS_SPAN + $(DefineConstants);HAS_SPAN + $(DefineConstants);NO_SERIALIZATION diff --git a/Iced/Intel/EncoderException.cs b/Iced/Intel/EncoderException.cs index dbb59ab80..8ea5fe315 100644 --- a/Iced/Intel/EncoderException.cs +++ b/Iced/Intel/EncoderException.cs @@ -23,13 +23,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #if !NO_ENCODER using System; -using System.Runtime.Serialization; namespace Iced.Intel { /// /// Thrown if the encoder can't encode an instruction /// +#if !NO_SERIALIZATION [Serializable] +#endif public class EncoderException : Exception { /// /// The instruction that couldn't be encoded @@ -43,12 +44,14 @@ namespace Iced.Intel { /// Instruction public EncoderException(string message, in Instruction instruction) : base(message) => Instruction = instruction; +#if !NO_SERIALIZATION /// /// Constructor /// /// /// - protected EncoderException(SerializationInfo info, StreamingContext context) : base(info, context) { } + protected EncoderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } +#endif } } #endif