Skip to content

Commit 4c58ad9

Browse files
committed
Add .NET 8.0 target with non-serializable exception type.
1 parent cdd99d0 commit 4c58ad9

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Most lines should begin with one of these words:
66

77
## [Unreleased](https://github.com/sharpjs/Prequel/compare/release/1.0.3..HEAD)
88
- Change license from ISC to MIT.
9+
- Add specific .NET 8.0 target framework.
910

1011
<!--
1112
## [1.1.0](https://github.com/sharpjs/Prequel/compare/release/1.0.3..release/1.1.0)

Prequel/Prequel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<PropertyGroup>
99
<Description>Minimal SQLCMD-compatible preprocessor</Description>
10-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
10+
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
1111
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1212
</PropertyGroup>
1313

Prequel/SqlCmdException.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// Copyright Subatomix Research Inc.
22
// SPDX-License-Identifier: MIT
33

4+
#if !NET8_OR_GREATER
45
using System.Runtime.Serialization;
6+
#endif
57

68
namespace Prequel;
79

810
/// <summary>
911
/// Represents an error that occurred during the operation of
1012
/// <see cref="SqlCmdPreprocessor"/>.
1113
/// </summary>
14+
#if !NET8_OR_GREATER
1215
[Serializable]
16+
#endif
1317
public class SqlCmdException : Exception
1418
{
1519
/// <summary>
@@ -43,6 +47,7 @@ public SqlCmdException(string message)
4347
public SqlCmdException(string message, Exception? innerException)
4448
: base(message, innerException) { }
4549

50+
#if !NET8_0_OR_GREATER
4651
/// <summary>
4752
/// Initializes a new <see cref="SqlCmdException"/> instance with
4853
/// serialized data.
@@ -65,4 +70,5 @@ public SqlCmdException(string message, Exception? innerException)
6570
[Obsolete("BinaryFormatter serialization is insecure and cannot be made secure.")]
6671
protected SqlCmdException(SerializationInfo info, StreamingContext context)
6772
: base(info, context) { }
73+
#endif
6874
}

0 commit comments

Comments
 (0)