Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
cc3b78fe
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cc3b78fe
编写于
11月 13, 2017
作者:
J
Jason Malinowski
提交者:
GitHub
11月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #23121 from jasonmalinowski/add-version-info-to-about-screen
Add the Roslyn version string into Help > About
上级
3a34dce9
2889d64e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
76 addition
and
0 deletion
+76
-0
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
+2
-0
src/VisualStudio/CSharp/Impl/VSPackage.resx
src/VisualStudio/CSharp/Impl/VSPackage.resx
+8
-0
src/VisualStudio/Core/Def/Utilities/ProvideRoslynVersionRegistration.cs
...io/Core/Def/Utilities/ProvideRoslynVersionRegistration.cs
+56
-0
src/VisualStudio/VisualBasic/Impl/LanguageService/VisualBasicPackage.vb
...io/VisualBasic/Impl/LanguageService/VisualBasicPackage.vb
+2
-0
src/VisualStudio/VisualBasic/Impl/VSPackage.resx
src/VisualStudio/VisualBasic/Impl/VSPackage.resx
+8
-0
未找到文件。
src/VisualStudio/CSharp/Impl/CSharpPackage.cs
浏览文件 @
cc3b78fe
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
using
Microsoft.VisualStudio.Shell
;
using
Microsoft.VisualStudio.Shell
;
using
Microsoft.VisualStudio.Shell.Interop
;
using
Microsoft.VisualStudio.Shell.Interop
;
using
Microsoft.CodeAnalysis.Host
;
using
Microsoft.CodeAnalysis.Host
;
using
Microsoft.VisualStudio.LanguageServices.Utilities
;
// NOTE(DustinCa): The EditorFactory registration is in VisualStudioComponents\CSharpPackageRegistration.pkgdef.
// NOTE(DustinCa): The EditorFactory registration is in VisualStudioComponents\CSharpPackageRegistration.pkgdef.
// The reason for this is because the ProvideEditorLogicalView does not allow a name value to specified in addition to
// The reason for this is because the ProvideEditorLogicalView does not allow a name value to specified in addition to
...
@@ -28,6 +29,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService
...
@@ -28,6 +29,7 @@ namespace Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService
// (See vsproject\cool\coolpkg\pkg\VCSharp_Proj_System_Reg.pkgdef for an example).
// (See vsproject\cool\coolpkg\pkg\VCSharp_Proj_System_Reg.pkgdef for an example).
[
Guid
(
Guids
.
CSharpPackageIdString
)]
[
Guid
(
Guids
.
CSharpPackageIdString
)]
[
PackageRegistration
(
UseManagedResourcesOnly
=
true
)]
[
PackageRegistration
(
UseManagedResourcesOnly
=
true
)]
[
ProvideRoslynVersionRegistration
(
Guids
.
CSharpPackageIdString
,
"Microsoft Visual C#"
,
productNameResourceID
:
116
,
detailsResourceID
:
117
)]
[
ProvideLanguageExtension
(
typeof
(
CSharpLanguageService
),
".cs"
)]
[
ProvideLanguageExtension
(
typeof
(
CSharpLanguageService
),
".cs"
)]
[
ProvideLanguageService
(
Guids
.
CSharpLanguageServiceIdString
,
"CSharp"
,
languageResourceID
:
101
,
RequestStockColors
=
true
,
ShowDropDownOptions
=
true
)]
[
ProvideLanguageService
(
Guids
.
CSharpLanguageServiceIdString
,
"CSharp"
,
languageResourceID
:
101
,
RequestStockColors
=
true
,
ShowDropDownOptions
=
true
)]
...
...
src/VisualStudio/CSharp/Impl/VSPackage.resx
浏览文件 @
cc3b78fe
...
@@ -215,4 +215,12 @@
...
@@ -215,4 +215,12 @@
<value>
Naming Style;Name Styles;Naming Rule;Naming Conventions
</value>
<value>
Naming Style;Name Styles;Naming Rule;Naming Conventions
</value>
<comment>
C# Naming Style options page keywords
</comment>
<comment>
C# Naming Style options page keywords
</comment>
</data>
</data>
<data
name=
"116"
xml:space=
"preserve"
>
<value>
C# Tools
</value>
<comment>
Help
>
About
</comment>
</data>
<data
name=
"117"
xml:space=
"preserve"
>
<value>
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
</value>
<comment>
Help
>
About
</comment>
</data>
</root>
</root>
\ No newline at end of file
src/VisualStudio/Core/Def/Utilities/ProvideRoslynVersionRegistration.cs
0 → 100644
浏览文件 @
cc3b78fe
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
Microsoft.VisualStudio.Shell
;
namespace
Microsoft.VisualStudio.LanguageServices.Utilities
{
/// <summary>
/// Adds information to Help > About screen showing the version of the Roslyn package.
/// </summary>
internal
sealed
class
ProvideRoslynVersionRegistration
:
RegistrationAttribute
{
private
readonly
string
_packageGuidString
;
private
readonly
string
_productName
;
private
readonly
int
_productNameResourceID
;
private
readonly
int
_detailsResourceID
;
public
ProvideRoslynVersionRegistration
(
string
packageGuidString
,
string
productName
,
int
productNameResourceID
,
int
detailsResourceID
)
{
_packageGuidString
=
packageGuidString
;
_productName
=
productName
;
_productNameResourceID
=
productNameResourceID
;
_detailsResourceID
=
detailsResourceID
;
}
private
string
GetKeyName
()
{
return
"InstalledProducts\\"
+
_productName
;
}
public
override
void
Register
(
RegistrationContext
context
)
{
// Fetch the version of this build. As a reminder, this code runs during the build process, not at runtime -- it's
// ran by the CreatPkgDef.exe tool by reflecting over built assembly and invoking this method.
var
version
=
FileVersionInfo
.
GetVersionInfo
(
typeof
(
ProvideRoslynVersionRegistration
).
Assembly
.
Location
);
using
(
var
key
=
context
.
CreateKey
(
GetKeyName
()))
{
key
.
SetValue
(
null
,
"#"
+
_productNameResourceID
);
key
.
SetValue
(
"Package"
,
Guid
.
Parse
(
_packageGuidString
).
ToString
(
"B"
));
key
.
SetValue
(
"PID"
,
version
.
ProductVersion
);
key
.
SetValue
(
"ProductDetails"
,
"#"
+
_detailsResourceID
);
key
.
SetValue
(
"UseInterface"
,
false
);
key
.
SetValue
(
"UseVSProductID"
,
false
);
}
}
public
override
void
Unregister
(
RegistrationContext
context
)
{
context
.
RemoveKey
(
GetKeyName
());
}
}
}
src/VisualStudio/VisualBasic/Impl/LanguageService/VisualBasicPackage.vb
浏览文件 @
cc3b78fe
...
@@ -9,6 +9,7 @@ Imports Microsoft.VisualStudio.LanguageServices.CSharp.Options.Formatting
...
@@ -9,6 +9,7 @@ Imports Microsoft.VisualStudio.LanguageServices.CSharp.Options.Formatting
Imports
Microsoft.VisualStudio.LanguageServices.Implementation
Imports
Microsoft.VisualStudio.LanguageServices.Implementation
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
Imports
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
Imports
Microsoft.VisualStudio.LanguageServices.Utilities
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.ObjectBrowser
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.ObjectBrowser
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.Options
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim
Imports
Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim
...
@@ -38,6 +39,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic
...
@@ -38,6 +39,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic
<
Guid
(
Guids
.
VisualBasicPackageIdString
)
>
<
Guid
(
Guids
.
VisualBasicPackageIdString
)
>
<
PackageRegistration
(
UseManagedResourcesOnly
:
=
True
)
>
<
PackageRegistration
(
UseManagedResourcesOnly
:
=
True
)
>
<
ProvideRoslynVersionRegistration
(
Guids
.
VisualBasicPackageIdString
,
"Microsoft Visual Basic"
,
113
,
114
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".bas"
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".bas"
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".cls"
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".cls"
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".ctl"
)
>
<
ProvideLanguageExtension
(
GetType
(
VisualBasicLanguageService
),
".ctl"
)
>
...
...
src/VisualStudio/VisualBasic/Impl/VSPackage.resx
浏览文件 @
cc3b78fe
...
@@ -186,4 +186,12 @@
...
@@ -186,4 +186,12 @@
<value>
Change completion list settings;Pre-select most recently used member
</value>
<value>
Change completion list settings;Pre-select most recently used member
</value>
<comment>
IntelliSense options page keywords
</comment>
<comment>
IntelliSense options page keywords
</comment>
</data>
</data>
<data
name=
"114"
xml:space=
"preserve"
>
<value>
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
</value>
<comment>
Help
>
About
</comment>
</data>
<data
name=
"113"
xml:space=
"preserve"
>
<value>
Visual Basic Tools
</value>
<comment>
Help
>
About
</comment>
</data>
</root>
</root>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录