diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/InvalidManagedNameException.cs b/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/InvalidManagedNameException.cs index 1899e65c96..98a5ddaefc 100644 --- a/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/InvalidManagedNameException.cs +++ b/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/InvalidManagedNameException.cs @@ -5,6 +5,9 @@ namespace Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities { using System; +#if !NETSTANDARD1_0 && !WINDOWS_UWP + [Serializable] +#endif public class InvalidManagedNameException : Exception { public InvalidManagedNameException(string message) : base(message) { }