Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
6c3b97f9
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6c3b97f9
编写于
12月 18, 2019
作者:
K
Kevin Ransom (msft)
提交者:
GitHub
12月 18, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improven netcore implementation references (#7966)
上级
fbcbc8ee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
8 deletion
+17
-8
src/fsharp/DotNetFrameworkDependencies.fs
src/fsharp/DotNetFrameworkDependencies.fs
+12
-7
src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
+5
-1
未找到文件。
src/fsharp/DotNetFrameworkDependencies.fs
浏览文件 @
6c3b97f9
...
...
@@ -130,12 +130,17 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies
if
not
(
assemblies
.
ContainsKey
(
referenceName
))
then
try
assemblies
.
Add
(
referenceName
,
path
)
|>
ignore
if
referenceName
<>
"System.Private.CoreLib"
then
let
asm
=
System
.
Reflection
.
Assembly
.
LoadFrom
(
path
)
for
reference
in
asm
.
GetReferencedAssemblies
()
do
// System.Private.CoreLib doesn't load with reflection
traverseDependencies
reference
.
Name
if
File
.
Exists
(
path
)
then
// System.Private.CoreLib doesn't load with reflection
if
referenceName
=
"System.Private.CoreLib"
then
assemblies
.
Add
(
referenceName
,
path
)
else
try
let
asm
=
System
.
Reflection
.
Assembly
.
LoadFrom
(
path
)
assemblies
.
Add
(
referenceName
,
path
)
for
reference
in
asm
.
GetReferencedAssemblies
()
do
traverseDependencies
reference
.
Name
with
e
->
()
with
e
->
()
assemblyReferences
|>
List
.
iter
(
traverseDependencies
)
...
...
@@ -193,7 +198,7 @@ module internal FSharp.Compiler.DotNetFrameworkDependencies
let
getImplementationReferences
()
=
// Coreclr supports netstandard assemblies only for now
(
getDependenciesOf
[
yield
Path
.
Combine
(
implementationAssemblyDir
,
"netstandard
.dll"
)
yield
!
Directory
.
GetFiles
(
implementationAssemblyDir
,
"*
.dll"
)
yield
getDefaultFSharpCoreReference
if
useFsiAuxLib
then
yield
getFsiLibraryName
]).
Values
|>
Seq
.
toList
...
...
src/fsharp/FSharp.Compiler.Private.Scripting/FSharpScript.fs
浏览文件 @
6c3b97f9
...
...
@@ -32,7 +32,11 @@ type FSharpScript(?captureInput: bool, ?captureOutput: bool, ?additionalArgs: st
()
)()
let
config
=
FsiEvaluationSession
.
GetDefaultConfiguration
()
let
baseArgs
=
[|
this
.
GetType
()
.
Assembly
.
Location
;
"--noninteractive"
;
"--targetprofile:netcore"
;
"--quiet"
|]
let
computedProfile
=
// If we are being executed on the desktop framework (we can tell because the assembly containing int is mscorlib) then profile must be mscorlib otherwise use netcore
if
typeof
<
int
>.
Assembly
.
GetName
()
.
Name
=
"mscorlib"
then
"mscorlib"
else
"netcore"
let
baseArgs
=
[|
this
.
GetType
()
.
Assembly
.
Location
;
"--noninteractive"
;
"--targetprofile:"
+
computedProfile
;
"--quiet"
|]
let
argv
=
Array
.
append
baseArgs
additionalArgs
let
fsi
=
FsiEvaluationSession
.
Create
(
config
,
argv
,
stdin
,
stdout
,
stderr
,
collectible
=
true
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录