diff --git a/src/Renci.SshNet/Common/NetConfServerException.cs b/src/Renci.SshNet/Common/NetConfServerException.cs
index e8614bcb..ab70a834 100644
--- a/src/Renci.SshNet/Common/NetConfServerException.cs
+++ b/src/Renci.SshNet/Common/NetConfServerException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when there is something wrong with the server capabilities.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class NetConfServerException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/ProxyException.cs b/src/Renci.SshNet/Common/ProxyException.cs
index 457cec53..d324c9a3 100644
--- a/src/Renci.SshNet/Common/ProxyException.cs
+++ b/src/Renci.SshNet/Common/ProxyException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when a proxy connection cannot be established.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class ProxyException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/ScpException.cs b/src/Renci.SshNet/Common/ScpException.cs
index 26a7bdd8..564e2994 100644
--- a/src/Renci.SshNet/Common/ScpException.cs
+++ b/src/Renci.SshNet/Common/ScpException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when SCP error occurred.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class ScpException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SftpPathNotFoundException.cs b/src/Renci.SshNet/Common/SftpPathNotFoundException.cs
index 61af3b2f..ed628dee 100644
--- a/src/Renci.SshNet/Common/SftpPathNotFoundException.cs
+++ b/src/Renci.SshNet/Common/SftpPathNotFoundException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when file or directory is not found.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SftpPathNotFoundException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SftpPermissionDeniedException.cs b/src/Renci.SshNet/Common/SftpPermissionDeniedException.cs
index b040417f..04301cf3 100644
--- a/src/Renci.SshNet/Common/SftpPermissionDeniedException.cs
+++ b/src/Renci.SshNet/Common/SftpPermissionDeniedException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when operation permission is denied.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SftpPermissionDeniedException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SshAuthenticationException.cs b/src/Renci.SshNet/Common/SshAuthenticationException.cs
index e2909bdd..ad5b0b34 100644
--- a/src/Renci.SshNet/Common/SshAuthenticationException.cs
+++ b/src/Renci.SshNet/Common/SshAuthenticationException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when authentication failed.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SshAuthenticationException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SshConnectionException.cs b/src/Renci.SshNet/Common/SshConnectionException.cs
index a5c227b8..d4c46011 100644
--- a/src/Renci.SshNet/Common/SshConnectionException.cs
+++ b/src/Renci.SshNet/Common/SshConnectionException.cs
@@ -1,7 +1,7 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
using Renci.SshNet.Messages.Transport;
namespace Renci.SshNet.Common
@@ -9,9 +9,9 @@ namespace Renci.SshNet.Common
///
/// The exception that is thrown when connection was terminated.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SshConnectionException : SshException
{
///
@@ -70,7 +70,7 @@ namespace Renci.SshNet.Common
DisconnectReason = disconnectReasonCode;
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -82,6 +82,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SshException.cs b/src/Renci.SshNet/Common/SshException.cs
index a2f721ee..440f4488 100644
--- a/src/Renci.SshNet/Common/SshException.cs
+++ b/src/Renci.SshNet/Common/SshException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when SSH exception occurs.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SshException : Exception
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SshOperationTimeoutException.cs b/src/Renci.SshNet/Common/SshOperationTimeoutException.cs
index f8131887..2e0433d9 100644
--- a/src/Renci.SshNet/Common/SshOperationTimeoutException.cs
+++ b/src/Renci.SshNet/Common/SshOperationTimeoutException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when operation is timed out.
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SshOperationTimeoutException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Common/SshPassPhraseNullOrEmptyException.cs b/src/Renci.SshNet/Common/SshPassPhraseNullOrEmptyException.cs
index 1ddc1919..3da9ca42 100644
--- a/src/Renci.SshNet/Common/SshPassPhraseNullOrEmptyException.cs
+++ b/src/Renci.SshNet/Common/SshPassPhraseNullOrEmptyException.cs
@@ -1,16 +1,16 @@
using System;
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
using System.Runtime.Serialization;
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
namespace Renci.SshNet.Common
{
///
/// The exception that is thrown when pass phrase for key file is empty or .
///
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
public class SshPassPhraseNullOrEmptyException : SshException
{
///
@@ -39,7 +39,7 @@ namespace Renci.SshNet.Common
{
}
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
///
/// Initializes a new instance of the class.
///
@@ -51,6 +51,6 @@ namespace Renci.SshNet.Common
: base(info, context)
{
}
-#endif // FEATURE_BINARY_SERIALIZATION
+#endif // NETFRAMEWORK
}
}
diff --git a/src/Renci.SshNet/Renci.SshNet.csproj b/src/Renci.SshNet/Renci.SshNet.csproj
index 840c53c6..a6cf6188 100644
--- a/src/Renci.SshNet/Renci.SshNet.csproj
+++ b/src/Renci.SshNet/Renci.SshNet.csproj
@@ -29,10 +29,6 @@
true
-
- $(DefineConstants);FEATURE_BINARY_SERIALIZATION
-
-
diff --git a/src/Renci.SshNet/Security/BouncyCastle/math/BigInteger.cs b/src/Renci.SshNet/Security/BouncyCastle/math/BigInteger.cs
index a98959ef..a947d590 100644
--- a/src/Renci.SshNet/Security/BouncyCastle/math/BigInteger.cs
+++ b/src/Renci.SshNet/Security/BouncyCastle/math/BigInteger.cs
@@ -10,7 +10,7 @@ using Renci.SshNet.Security.Org.BouncyCastle.Utilities;
namespace Renci.SshNet.Security.Org.BouncyCastle.Math
{
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
#endif
internal class BigInteger
diff --git a/src/Renci.SshNet/Security/BouncyCastle/security/SecurityUtilityException.cs b/src/Renci.SshNet/Security/BouncyCastle/security/SecurityUtilityException.cs
index 25a442e4..acd208b3 100644
--- a/src/Renci.SshNet/Security/BouncyCastle/security/SecurityUtilityException.cs
+++ b/src/Renci.SshNet/Security/BouncyCastle/security/SecurityUtilityException.cs
@@ -2,7 +2,7 @@ using System;
namespace Renci.SshNet.Security.Org.BouncyCastle.Security
{
-#if FEATURE_BINARY_SERIALIZATION
+#if NETFRAMEWORK
[Serializable]
#endif
internal class SecurityUtilityException