Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5b24516b
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,发现更多精彩内容 >>
未验证
提交
5b24516b
编写于
5月 07, 2018
作者:
J
Jonathon Marolf
提交者:
GitHub
5月 07, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #26684 from jmarolf/fix-f5-for-sdk-projects
Fixing compiler extension in CPS
上级
12f6478f
3ffc85bb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
44 addition
and
3 deletion
+44
-3
build/Targets/Packages.props
build/Targets/Packages.props
+1
-0
src/Compilers/Extension/CompilerExtension.csproj
src/Compilers/Extension/CompilerExtension.csproj
+7
-0
src/Compilers/Extension/CompilerPackage.cs
src/Compilers/Extension/CompilerPackage.cs
+5
-3
src/Compilers/Extension/SetGlobalGlobalPropertiesForCPS.cs
src/Compilers/Extension/SetGlobalGlobalPropertiesForCPS.cs
+30
-0
src/Compilers/Extension/source.extension.vsixmanifest
src/Compilers/Extension/source.extension.vsixmanifest
+1
-0
未找到文件。
build/Targets/Packages.props
浏览文件 @
5b24516b
...
...
@@ -98,6 +98,7 @@
<MicrosoftVisualStudioProgressionCommonVersion>
15.0.26730-alpha
</MicrosoftVisualStudioProgressionCommonVersion>
<MicrosoftVisualStudioProgressionInterfacesVersion>
15.0.26730-alpha
</MicrosoftVisualStudioProgressionInterfacesVersion>
<MicrosoftVisualStudioProjectSystemVersion>
15.3.178-pre-g209fb07c2e
</MicrosoftVisualStudioProjectSystemVersion>
<MicrosoftVisualStudioProjectSystemManagedVersion>
2.3.6152103
</MicrosoftVisualStudioProjectSystemManagedVersion>
<MicrosoftVisualStudioQualityToolsUnitTestFrameworkVersion>
10.0.0.0-alpha
</MicrosoftVisualStudioQualityToolsUnitTestFrameworkVersion>
<MicrosoftVisualStudioRemoteControlVersion>
14.0.249-master2E2DC10C
</MicrosoftVisualStudioRemoteControlVersion>
<MicrosoftVisualStudioSetupConfigurationInteropVersion>
1.11.2290
</MicrosoftVisualStudioSetupConfigurationInteropVersion>
...
...
src/Compilers/Extension/CompilerExtension.csproj
浏览文件 @
5b24516b
...
...
@@ -134,6 +134,7 @@
<AdditionalProperties>
TargetFramework=net46
</AdditionalProperties>
</ProjectReference>
<PackageReference
Include=
"EnvDTE"
Version=
"$(EnvDTEVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.ProjectSystem.Managed"
Version=
"$(MicrosoftVisualStudioProjectSystemManagedVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Shell.15.0"
Version=
"$(MicrosoftVisualStudioShell150Version)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Shell.Interop.8.0"
Version=
"$(MicrosoftVisualStudioShellInterop80Version)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Shell.Interop.9.0"
Version=
"$(MicrosoftVisualStudioShellInterop90Version)"
/>
...
...
@@ -141,5 +142,11 @@
<PackageReference
Include=
"Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime"
Version=
"$(MicrosoftVisualStudioShellInterop153DesignTimeVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Shell.Framework"
Version=
"$(MicrosoftVisualStudioShellFrameworkVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Utilities"
Version=
"$(MicrosoftVisualStudioUtilitiesVersion)"
/>
<PackageReference
Include=
"Microsoft.Build"
Version=
"$(MicrosoftBuildVersion)"
/>
<PackageReference
Include=
"Microsoft.Build.Framework"
Version=
"$(MicrosoftBuildFrameworkVersion)"
/>
<PackageReference
Include=
"Microsoft.Build.Tasks.Core"
Version=
"$(MicrosoftBuildTasksCoreVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Threading"
Version=
"$(MicrosoftVisualStudioThreadingVersion)"
/>
<PackageReference
Include=
"Microsoft.VisualStudio.Validation"
Version=
"$(MicrosoftVisualStudioValidationVersion)"
/>
<PackageReference
Include=
"System.Threading.Thread"
Version=
"$(SystemThreadingThreadVersion)"
/>
</ItemGroup>
</Project>
\ No newline at end of file
src/Compilers/Extension/CompilerPackage.cs
浏览文件 @
5b24516b
...
...
@@ -13,6 +13,8 @@ namespace Roslyn.Compilers.Extension
[
ProvideAutoLoad
(
UIContextGuids
.
SolutionExists
)]
public
sealed
class
CompilerPackage
:
Package
{
public
static
string
RoslynHive
=
null
;
protected
override
void
Initialize
()
{
base
.
Initialize
();
...
...
@@ -30,14 +32,14 @@ protected override void Initialize()
{
var
skuName
=
registryParts
[
2
];
var
hiveName
=
registryParts
[
3
];
var
r
oslynHive
=
string
.
Format
(
@"{0}.{1}"
,
registryParts
[
2
],
registryParts
[
3
]);
R
oslynHive
=
string
.
Format
(
@"{0}.{1}"
,
registryParts
[
2
],
registryParts
[
3
]);
WriteMSBuildFiles
(
packagePath
,
r
oslynHive
);
WriteMSBuildFiles
(
packagePath
,
R
oslynHive
);
try
{
Microsoft
.
Build
.
Evaluation
.
ProjectCollection
.
GlobalProjectCollection
.
DisableMarkDirty
=
true
;
Microsoft
.
Build
.
Evaluation
.
ProjectCollection
.
GlobalProjectCollection
.
SetGlobalProperty
(
"RoslynHive"
,
r
oslynHive
);
Microsoft
.
Build
.
Evaluation
.
ProjectCollection
.
GlobalProjectCollection
.
SetGlobalProperty
(
"RoslynHive"
,
R
oslynHive
);
}
finally
{
...
...
src/Compilers/Extension/SetGlobalGlobalPropertiesForCPS.cs
0 → 100644
浏览文件 @
5b24516b
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System.Collections.Immutable
;
using
System.ComponentModel.Composition
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.VisualStudio.ProjectSystem
;
using
Microsoft.VisualStudio.ProjectSystem.Build
;
using
Microsoft.VisualStudio.Shell.Interop
;
namespace
Roslyn.Compilers.Extension
{
[
ExportBuildGlobalPropertiesProvider
]
[
AppliesTo
(
"("
+
ProjectCapabilities
.
CSharp
+
" | "
+
ProjectCapabilities
.
VB
+
")"
+
" & "
+
ProjectCapabilities
.
LanguageService
)]
public
class
SetGlobalGlobalPropertiesForCPS
:
StaticGlobalPropertiesProviderBase
{
[
ImportingConstructor
]
public
SetGlobalGlobalPropertiesForCPS
(
IProjectService
projectService
)
:
base
(
projectService
.
Services
)
{
}
public
override
Task
<
IImmutableDictionary
<
string
,
string
>>
GetGlobalPropertiesAsync
(
CancellationToken
cancellationToken
)
{
return
CompilerPackage
.
RoslynHive
!=
null
?
Task
.
FromResult
<
IImmutableDictionary
<
string
,
string
>>(
Empty
.
PropertiesMap
.
Add
(
"RoslynHive"
,
CompilerPackage
.
RoslynHive
))
:
Task
.
FromResult
<
IImmutableDictionary
<
string
,
string
>>(
Empty
.
PropertiesMap
);
}
}
}
src/Compilers/Extension/source.extension.vsixmanifest
浏览文件 @
5b24516b
...
...
@@ -12,6 +12,7 @@
<Dependency
Id=
"Microsoft.Framework.NDP"
DisplayName=
"Microsoft .NET Framework"
d:Source=
"Manual"
Version=
"[4.5,)"
/>
</Dependencies>
<Assets>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"|%CurrentProject%|"
d:Source=
"Project"
d:ProjectName=
"%CurrentProject%"
/>
<Asset
Type=
"Microsoft.VisualStudio.VsPackage"
Path=
"|%CurrentProject%;PkgdefProjectOutputGroup|"
d:Source=
"Project"
d:ProjectName=
"%CurrentProject%"
/>
</Assets>
<Prerequisites>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录