Add netstandard1.4 tf, remove netcoreapp2.1

This commit is contained in:
de4dot 2019-02-16 12:09:44 +01:00
parent 689cbd3934
commit 7984098427
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net452</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.4;net452</TargetFrameworks>
<!-- It's not possible to target .NET Framework 3.5 when using dotnet build
https://github.com/Microsoft/msbuild/issues/1333 -->
<NoTargetFrameworkNet35 Condition=" '$(NoTargetFrameworkNet35)' == '' AND '$(MSBuildRuntimeType)' == 'Core' ">true</NoTargetFrameworkNet35>
@ -50,7 +50,8 @@ License: MIT
</ItemGroup>
<PropertyGroup>
<DefineConstants Condition=" $(TargetFramework.StartsWith(netcoreapp)) OR ($(TargetFramework.StartsWith(netstandard)) AND '$(TargetFramework)' != 'netstandard2.0') ">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition=" $(TargetFramework.StartsWith(netstandard)) AND !$(TargetFramework.StartsWith(netstandard1.)) AND '$(TargetFramework)' != 'netstandard2.0' ">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition=" $(TargetFramework.StartsWith(netstandard1.)) ">$(DefineConstants);NO_SERIALIZATION</DefineConstants>
</PropertyGroup>
</Project>

View File

@ -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 {
/// <summary>
/// Thrown if the encoder can't encode an instruction
/// </summary>
#if !NO_SERIALIZATION
[Serializable]
#endif
public class EncoderException : Exception {
/// <summary>
/// The instruction that couldn't be encoded
@ -43,12 +44,14 @@ namespace Iced.Intel {
/// <param name="instruction">Instruction</param>
public EncoderException(string message, in Instruction instruction) : base(message) => Instruction = instruction;
#if !NO_SERIALIZATION
/// <summary>
/// Constructor
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
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