Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
7f8374e7
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,发现更多精彩内容 >>
提交
7f8374e7
编写于
10月 17, 2018
作者:
K
Kevin Ransom (msft)
提交者:
Brett V. Forsgren
10月 17, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix # 5514 (#5516) (#5783)
上级
bd501a7c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
45 deletion
+10
-45
src/utils/CompilerLocationUtils.fs
src/utils/CompilerLocationUtils.fs
+7
-25
vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb
...System.PropertyPages/PropertyPages/ApplicationPropPage.vb
+3
-20
未找到文件。
src/utils/CompilerLocationUtils.fs
浏览文件 @
7f8374e7
...
...
@@ -217,31 +217,13 @@ module internal FSharpEnvironment =
match
probePoint
with
|
Some
p
when
safeExists
(
Path
.
Combine
(
p
,
"FSharp.Core.dll"
))
->
Some
p
|
_
->
// On windows the location of the compiler is via a registry key
// Note: If the keys below change, be sure to update code in:
// Property pages (ApplicationPropPage.vb)
let
keys
=
[|
@
"Software
\
Microsoft
\
FSharp
\
10.1
\
Runtime
\
v4.0"
;
@
"Software
\
Microsoft
\
FSharp
\
4.1
\
Runtime
\
v4.0"
;
@
"Software
\
Microsoft
\
FSharp
\
4.0
\
Runtime
\
v4.0"
|]
let
path
=
keys
|>
Seq
.
tryPick
(
fun
k
->
tryRegKey
k
)
match
path
with
|
Some
_
->
path
|
None
->
// On Unix we let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions.
let
result
=
let
var
=
System
.
Environment
.
GetEnvironmentVariable
(
"FSHARP_COMPILER_BIN"
)
if
String
.
IsNullOrEmpty
(
var
)
then
None
else
Some
(
var
)
match
result
with
|
Some
_
->
result
|
None
->
// For the prototype compiler, we can just use the current domain
tryCurrentDomain
()
// We let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions.
let
result
=
System
.
Environment
.
GetEnvironmentVariable
(
"FSHARP_COMPILER_BIN"
)
if
not
(
String
.
IsNullOrEmpty
(
result
))
then
Some
result
else
// For the prototype compiler, we can just use the current domain
tryCurrentDomain
()
with
e
->
System
.
Diagnostics
.
Debug
.
Assert
(
false
,
"Error while determining default location of F# compiler"
)
None
...
...
vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb
浏览文件 @
7f8374e7
...
...
@@ -49,8 +49,6 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
Protected
Const
INDEX_WINDOWSCLASSLIB
As
Integer
=
2
Protected
Const
INDEX_LAST
As
Integer
=
INDEX_WINDOWSCLASSLIB
Public
Const
Const_TargetFrameworkMoniker
As
String
=
"TargetFrameworkMoniker"
Private
m_v20FSharpRedistInstalled
As
Boolean
=
False
Private
m_v40FSharpRedistInstalled
As
Boolean
=
False
Friend
WithEvents
TargetFramework
As
System
.
Windows
.
Forms
.
ComboBox
Friend
WithEvents
TargetFrameworkLabel
As
System
.
Windows
.
Forms
.
Label
...
...
@@ -75,12 +73,6 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
m_OutputTypeStringKeys
(
INDEX_COMMANDLINEAPP
)
=
SR
.
GetString
(
SR
.
PPG_CommandLineApp
)
m_OutputTypeStringKeys
(
INDEX_WINDOWSCLASSLIB
)
=
SR
.
GetString
(
SR
.
PPG_WindowsClassLib
)
Dim
v20FSharpRedistKey
As
String
=
"HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\10.1\Runtime\v2.0"
Dim
v40FSharpRedistKey
As
String
=
"HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\10.1\Runtime\v4.0"
m_v20FSharpRedistInstalled
=
Not
(
IsNothing
(
Microsoft
.
Win32
.
Registry
.
GetValue
(
v20FSharpRedistKey
,
Nothing
,
Nothing
)))
m_v40FSharpRedistInstalled
=
Not
(
IsNothing
(
Microsoft
.
Win32
.
Registry
.
GetValue
(
v40FSharpRedistKey
,
Nothing
,
Nothing
)))
'Add any initialization after the InitializeComponent() call
AddChangeHandlers
()
...
...
@@ -587,18 +579,9 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
If
moniker
.
StartsWith
(
".NETCoreApp"
)
OrElse
moniker
.
StartsWith
(
".NETStandard"
)
Then
Return
True
End
If
If
moniker
.
Contains
(
"v2"
)
Then
Return
Me
.
m_v20FSharpRedistInstalled
End
If
If
moniker
.
Contains
(
"v3.0"
)
Then
Return
Me
.
m_v20FSharpRedistInstalled
End
If
If
moniker
.
Contains
(
"v3.5"
)
Then
Return
Me
.
m_v20FSharpRedistInstalled
End
If
'' Is this cheating?
If
moniker
.
Contains
(
"v4"
)
Then
Return
Me
.
m_v40FSharpRedistInstalled
' With the latest tooling, if we have editors the redist is installed by definition
If
moniker
.
Contains
(
"v2"
)
Or
moniker
.
Contains
(
"v3.0"
)
Or
moniker
.
Contains
(
"v3.5"
)
Or
moniker
.
Contains
(
"v4"
)
Then
Return
True
End
If
Return
False
End
Function
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录