Skip to content

Commit bbe7cd4

Browse files
committed
Fix netstandard1.3 does not use reflection.emit.
1 parent c143af6 commit bbe7cd4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/MsgPack/Serialization/MessagePackSerializer.Factories.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#define AOT
2727
#endif
2828

29-
#if !AOT && !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3
29+
#if !AOT && !SILVERLIGHT && !NETSTANDARD1_1
3030
#define FEATURE_EMIT
31-
#endif // !AOT && !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3
31+
#endif // !AOT && !SILVERLIGHT && !NETSTANDARD1_1
3232

3333
using System;
3434
using System.IO;
@@ -49,7 +49,9 @@
4949
#endif // CORE_CLR || UNITY || NETSTANDARD1_1
5050
#if FEATURE_EMIT
5151
using MsgPack.Serialization.AbstractSerializers;
52+
#if !NETSTANDARD1_3
5253
using MsgPack.Serialization.CodeDomSerializers;
54+
#endif // !NETSTANDARD1_3
5355
using MsgPack.Serialization.EmittingSerializers;
5456
#endif // FEATURE_EMIT
5557

@@ -252,6 +254,7 @@ internal static MessagePackSerializer<T> CreateInternal<T>( SerializationContext
252254
ISerializerBuilder builder;
253255
switch ( context.SerializerOptions.EmitterFlavor )
254256
{
257+
#if !NETSTANDARD1_3
255258
case EmitterFlavor.CodeDomBased:
256259
{
257260
#if DEBUG
@@ -268,10 +271,11 @@ internal static MessagePackSerializer<T> CreateInternal<T>( SerializationContext
268271

269272
builder = new CodeDomSerializerBuilder( typeof( T ), collectionTraits );
270273
break;
271-
#else
274+
#else // DEBUG
272275
throw new NotSupportedException();
273-
#endif
276+
#endif // DEBUG
274277
}
278+
#endif // !NETSTANDARD1_3
275279
case EmitterFlavor.FieldBased:
276280
{
277281
builder = new AssemblyBuilderSerializerBuilder( typeof( T ), collectionTraits );

0 commit comments

Comments
 (0)