File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
ExpressionDebugger.Console Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
- <Project Sdk =" Microsoft.NET.Sdk" >
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >netcoreapp2.0 </TargetFramework >
5
+ <TargetFramework >net461 </TargetFramework >
6
6
</PropertyGroup >
7
7
8
8
<ItemGroup >
Original file line number Diff line number Diff line change 9
9
using System . Linq ;
10
10
using System . Linq . Expressions ;
11
11
using System . Reflection ;
12
- using System . Runtime . Loader ;
13
12
using System . Text ;
14
13
15
14
namespace ExpressionDebugger
@@ -78,8 +77,11 @@ from n in t.TypeNames
78
77
if ( _options ? . References != null )
79
78
references . UnionWith ( _options . References ) ;
80
79
references . Add ( typeof ( object ) . Assembly ) ;
80
+
81
+ #if NETSTANDARD2_0
81
82
references . Add ( Assembly . Load ( new AssemblyName ( "System.Runtime" ) ) ) ;
82
83
references . Add ( Assembly . Load ( new AssemblyName ( "System.Collections" ) ) ) ;
84
+ #endif
83
85
84
86
var assemblyName = Path . GetRandomFileName ( ) ;
85
87
var symbolsName = Path . ChangeExtension ( assemblyName , "pdb" ) ;
@@ -127,7 +129,11 @@ from n in t.TypeNames
127
129
assemblyStream . Seek ( 0 , SeekOrigin . Begin ) ;
128
130
symbolsStream . Seek ( 0 , SeekOrigin . Begin ) ;
129
131
130
- return AssemblyLoadContext . Default . LoadFromStream ( assemblyStream , symbolsStream ) ;
132
+ #if NETSTANDARD2_0
133
+ return System . Runtime . Loader . AssemblyLoadContext . Default . LoadFromStream ( assemblyStream , symbolsStream ) ;
134
+ #else
135
+ return Assembly . Load ( assemblyStream . ToArray ( ) , symbolsStream . ToArray ( ) ) ;
136
+ #endif
131
137
}
132
138
}
133
139
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netstandard2.0</ TargetFramework >
4
+ <TargetFrameworks >netstandard2.0;net461</ TargetFrameworks >
5
5
<GeneratePackageOnBuild >True</GeneratePackageOnBuild >
6
6
<Authors >Chaowlert Chaisrichalermpol</Authors >
7
7
<Description >Step into debugging from linq expressions</Description >
12
12
<SignAssembly >True</SignAssembly >
13
13
<PublicSign Condition =" '$(OS)' != 'Windows_NT' " >true</PublicSign >
14
14
<AssemblyOriginatorKeyFile >ExpressionDebugger.snk</AssemblyOriginatorKeyFile >
15
- <Version >2.1.0 </Version >
15
+ <Version >2.1.1 </Version >
16
16
<FileVersion >2.1.0</FileVersion >
17
17
<AssemblyVersion >2.1.0</AssemblyVersion >
18
18
<PackageLicenseUrl >https://github.com/chaowlert/ExpressionDebugger/blob/master/LICENSE</PackageLicenseUrl >
19
19
</PropertyGroup >
20
20
21
21
<ItemGroup >
22
22
<PackageReference Include =" Microsoft.CodeAnalysis.CSharp" Version =" 2.8.0" />
23
+ </ItemGroup >
24
+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
23
25
<PackageReference Include =" System.Runtime.Loader" Version =" 4.3.0" />
24
26
</ItemGroup >
25
27
You can’t perform that action at this time.
0 commit comments