8000 😱 · dotnet-script/dotnet-script@d650bf8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit d650bf8

Browse files
committed
😱
1 parent 4585beb commit d650bf8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/Dotnet.Script.Core/ScriptCompiler.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ public virtual ScriptOptions CreateScriptOptions(ScriptContext context, IList<Ru
101101
"System.Xml.Linq",
102102
"System.Net.Http",
103103
"Microsoft.CSharp");
104+
105+
78FD // on *nix load netstandard
106+
if (!ScriptEnvironment.Default.IsWindows)
107+
{
108+
var netstandard = Assembly.Load("netstandard");
109+
if (netstandard != null)
110+
{
111+
opts = opts.AddReferences(MetadataReference.CreateFromFile(netstandard.Location));
112+
}
113+
}
104114
}
105115

106116
if (!string.IsNullOrWhiteSpace(context.FilePath))

0 commit comments

Comments
 (0)
0