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" >
22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp2.0 </TargetFramework >
5+ <TargetFramework >net461 </TargetFramework >
66 </PropertyGroup >
77
88 <ItemGroup >
Original file line number Diff line number Diff line change 99using System . Linq ;
1010using System . Linq . Expressions ;
1111using System . Reflection ;
12- using System . Runtime . Loader ;
1312using System . Text ;
1413
1514namespace ExpressionDebugger
@@ -78,8 +77,11 @@ from n in t.TypeNames
7877 if ( _options ? . References != null )
7978 references . UnionWith ( _options . References ) ;
8079 references . Add ( typeof ( object ) . Assembly ) ;
80+
81+ #if NETSTANDARD2_0
8182 references . Add ( Assembly . Load ( new AssemblyName ( "System.Runtime" ) ) ) ;
8283 references . Add ( Assembly . Load ( new AssemblyName ( "System.Collections" ) ) ) ;
84+ #endif
8385
8486 var assemblyName = Path . GetRandomFileName ( ) ;
8587 var symbolsName = Path . ChangeExtension ( assemblyName , "pdb" ) ;
@@ -127,7 +129,11 @@ from n in t.TypeNames
127129 assemblyStream . Seek ( 0 , SeekOrigin . Begin ) ;
128130 symbolsStream . Seek ( 0 , SeekOrigin . Begin ) ;
129131
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
131137 }
132138 }
133139
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0</ TargetFramework >
4+ <TargetFrameworks >netstandard2.0;net461</ TargetFrameworks >
55 <GeneratePackageOnBuild >True</GeneratePackageOnBuild >
66 <Authors >Chaowlert Chaisrichalermpol</Authors >
77 <Description >Step into debugging from linq expressions</Description >
1212 <SignAssembly >True</SignAssembly >
1313 <PublicSign Condition =" '$(OS)' != 'Windows_NT' " >true</PublicSign >
1414 <AssemblyOriginatorKeyFile >ExpressionDebugger.snk</AssemblyOriginatorKeyFile >
15- <Version >2.1.0 </Version >
15+ <Version >2.1.1 </Version >
1616 <FileVersion >2.1.0</FileVersion >
1717 <AssemblyVersion >2.1.0</AssemblyVersion >
1818 <PackageLicenseUrl >https://github.com/chaowlert/ExpressionDebugger/blob/master/LICENSE</PackageLicenseUrl >
1919 </PropertyGroup >
2020
2121 <ItemGroup >
2222 <PackageReference Include =" Microsoft.CodeAnalysis.CSharp" Version =" 2.8.0" />
23+ </ItemGroup >
24+ <ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
2325 <PackageReference Include =" System.Runtime.Loader" Version =" 4.3.0" />
2426 </ItemGroup >
2527
You can’t perform that action at this time.
0 commit comments