Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
0b79b9f6
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,发现更多精彩内容 >>
未验证
提交
0b79b9f6
编写于
2月 06, 2018
作者:
A
Abhitej John
提交者:
GitHub
2月 06, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #24661 from dotnet/merges/dev15.6.x-to-dev15.7.x-20180206-080012
Merge dev15.6.x to dev15.7.x
上级
65c6cbb4
79e71826
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
46 addition
and
12 deletion
+46
-12
build/Targets/Packages.props
build/Targets/Packages.props
+1
-1
src/Compilers/Shared/GlobalAssemblyCacheHelpers/FusionAssemblyIdentity.cs
...ared/GlobalAssemblyCacheHelpers/FusionAssemblyIdentity.cs
+2
-2
src/EditorFeatures/Core/EditorFeatures.csproj
src/EditorFeatures/Core/EditorFeatures.csproj
+7
-0
src/EditorFeatures/Core/Implementation/MetadataAsSource/MetadataAsSourceFileService.cs
...mentation/MetadataAsSource/MetadataAsSourceFileService.cs
+31
-4
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
...ore/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
+1
-1
src/Interactive/EditorFeatures/Core/Completion/GlobalAssemblyCacheCompletionHelper.cs
...es/Core/Completion/GlobalAssemblyCacheCompletionHelper.cs
+3
-3
src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpBuild.cs
...io/IntegrationTest/IntegrationTests/CSharp/CSharpBuild.cs
+1
-1
未找到文件。
build/Targets/Packages.props
浏览文件 @
0b79b9f6
...
...
@@ -144,7 +144,7 @@
<MicrosoftDiaSymReaderPdb2PdbVersion>
1.1.0-beta1-62506-02
</MicrosoftDiaSymReaderPdb2PdbVersion>
<RestSharpVersion>
105.2.3
</RestSharpVersion>
<RoslynBuildUtilVersion>
0.9.8-beta
</RoslynBuildUtilVersion>
<RoslynDependenciesOptimizationDataVersion>
2.
6.0-beta1-62205-01
</RoslynDependenciesOptimizationDataVersion>
<RoslynDependenciesOptimizationDataVersion>
2.
7.0-beta3-62526-01-2
</RoslynDependenciesOptimizationDataVersion>
<RoslynToolsMicrosoftLocateVSVersion>
0.2.4-beta
</RoslynToolsMicrosoftLocateVSVersion>
<RoslynToolsMicrosoftSignToolVersion>
0.3.7-beta
</RoslynToolsMicrosoftSignToolVersion>
<RoslynToolsMicrosoftVSIXExpInstallerVersion>
0.4.0-beta
</RoslynToolsMicrosoftVSIXExpInstallerVersion>
...
...
src/Compilers/Shared/GlobalAssemblyCacheHelpers/FusionAssemblyIdentity.cs
浏览文件 @
0b79b9f6
...
...
@@ -441,7 +441,7 @@ internal static IAssemblyName ToAssemblyNameObject(AssemblyName name)
throw
new
ArgumentException
(
Scripting
.
ScriptingResources
.
InvalidCharactersInAssemblyName
,
nameof
(
name
));
#elif WORKSPACE_DESKTOP
#elif WORKSPACE_DESKTOP
|| EDITOR_FEATURES
throw
new
ArgumentException
(
Microsoft
.
CodeAnalysis
.
WorkspaceDesktopResources
.
Invalid_characters_in_assembly_name
,
nameof
(
name
));
...
...
@@ -471,7 +471,7 @@ internal static IAssemblyName ToAssemblyNameObject(AssemblyName name)
throw
new
ArgumentException
(
Microsoft
.
CodeAnalysis
.
Scripting
.
ScriptingResources
.
InvalidCharactersInAssemblyName
,
nameof
(
name
));
#elif WORKSPACE_DESKTOP
#elif WORKSPACE_DESKTOP
|| EDITOR_FEATURES
throw
new
ArgumentException
(
Microsoft
.
CodeAnalysis
.
WorkspaceDesktopResources
.
Invalid_characters_in_assembly_name
,
nameof
(
name
));
...
...
src/EditorFeatures/Core/EditorFeatures.csproj
浏览文件 @
0b79b9f6
...
...
@@ -9,6 +9,7 @@
<AssemblyName>
Microsoft.CodeAnalysis.EditorFeatures
</AssemblyName>
<TargetFramework>
net46
</TargetFramework>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<DefineConstants>
$(DefineConstants);EDITOR_FEATURES
</DefineConstants>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\Compilers\Core\Portable\CodeAnalysis.csproj"
/>
...
...
@@ -94,6 +95,12 @@
<InternalsVisibleToFSharp
Include=
"FSharp.Editor"
/>
<InternalsVisibleToMoq
Include=
"DynamicProxyGenAssembly2"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"..\..\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs"
Link=
"Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs"
/>
<Compile
Include=
"..\..\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs"
Link=
"Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs"
/>
<Compile
Include=
"..\..\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs"
Link=
"Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs"
/>
<Compile
Include=
"..\..\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs"
Link=
"Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs"
/>
</ItemGroup>
<ItemGroup>
<Compile
Update=
"EditorFeaturesResources.Designer.cs"
>
<DependentUpon>
EditorFeaturesResources.resx
</DependentUpon>
...
...
src/EditorFeatures/Core/Implementation/MetadataAsSource/MetadataAsSourceFileService.cs
浏览文件 @
0b79b9f6
...
...
@@ -3,8 +3,10 @@
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.Composition
;
using
System.Globalization
;
using
System.IO
;
using
System.Linq
;
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
@@ -117,7 +119,8 @@ public async Task<MetadataAsSourceFile> GetGeneratedFileAsync(Project project, I
var
useDecompiler
=
allowDecompilation
;
if
(
useDecompiler
)
{
useDecompiler
=
!
symbol
.
ContainingAssembly
.
GetAttributes
().
Any
(
attribute
=>
attribute
.
AttributeClass
.
Name
==
nameof
(
SuppressIldasmAttribute
));
useDecompiler
=
!
symbol
.
ContainingAssembly
.
GetAttributes
().
Any
(
attribute
=>
attribute
.
AttributeClass
.
Name
==
nameof
(
SuppressIldasmAttribute
)
&&
attribute
.
AttributeClass
.
ToNameDisplayString
()
==
typeof
(
SuppressIldasmAttribute
).
FullName
);
}
if
(
useDecompiler
)
...
...
@@ -194,10 +197,34 @@ private async Task<Document> DecompileSymbolAsync(Document temporaryDocument, IS
var
fullName
=
GetFullReflectionName
(
containingOrThis
);
var
compilation
=
await
temporaryDocument
.
Project
.
GetCompilationAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
// TODO: retrieve path to actual assembly instead of reference assembly
var
reference
=
compilation
.
GetMetadataReference
(
symbol
.
ContainingAssembly
);
string
assemblyLocation
=
null
;
var
isReferenceAssembly
=
symbol
.
ContainingAssembly
.
GetAttributes
().
Any
(
attribute
=>
attribute
.
AttributeClass
.
Name
==
nameof
(
ReferenceAssemblyAttribute
)
&&
attribute
.
AttributeClass
.
ToNameDisplayString
()
==
typeof
(
ReferenceAssemblyAttribute
).
FullName
);
if
(
isReferenceAssembly
)
{
try
{
var
fullAssemblyName
=
symbol
.
ContainingAssembly
.
Identity
.
GetDisplayName
();
GlobalAssemblyCache
.
Instance
.
ResolvePartialName
(
fullAssemblyName
,
out
assemblyLocation
,
preferredCulture
:
CultureInfo
.
CurrentCulture
);
}
catch
(
Exception
e
)
when
(
FatalError
.
ReportWithoutCrash
(
e
))
{
}
}
if
(
assemblyLocation
==
null
)
{
var
reference
=
compilation
.
GetMetadataReference
(
symbol
.
ContainingAssembly
);
assemblyLocation
=
(
reference
as
PortableExecutableReference
)?.
FilePath
;
if
(
assemblyLocation
==
null
)
{
throw
new
NotSupportedException
(
EditorFeaturesResources
.
Cannot_navigate_to_the_symbol_under_the_caret
);
}
}
// Load the assembly.
var
ad
=
AssemblyDefinition
.
ReadAssembly
(
reference
.
Display
,
new
ReaderParameters
()
{
AssemblyResolver
=
new
RoslynAssemblyResolver
(
compilation
)
});
var
ad
=
AssemblyDefinition
.
ReadAssembly
(
assemblyLocation
,
new
ReaderParameters
()
{
AssemblyResolver
=
new
RoslynAssemblyResolver
(
compilation
)
});
// Initialize a decompiler with default settings.
var
decompiler
=
new
CSharpDecompiler
(
ad
.
MainModule
,
new
DecompilerSettings
());
...
...
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
浏览文件 @
0b79b9f6
...
...
@@ -32,7 +32,7 @@ internal static ForegroundThreadData CreateDefault(ForegroundThreadDataKind defa
{
var
kind
=
ForegroundThreadDataInfo
.
CreateDefault
(
defaultKind
);
return
new
ForegroundThreadData
(
Thread
.
CurrentThread
,
new
SynchronizationContextTaskScheduler
(
SynchronizationContext
.
Current
),
kind
);
return
new
ForegroundThreadData
(
Thread
.
CurrentThread
,
SynchronizationContext
.
Current
==
null
?
TaskScheduler
.
Default
:
new
SynchronizationContextTaskScheduler
(
SynchronizationContext
.
Current
),
kind
);
}
}
...
...
src/Interactive/EditorFeatures/Core/Completion/GlobalAssemblyCacheCompletionHelper.cs
浏览文件 @
0b79b9f6
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
extern
alias
Scripting
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Immutable
;
...
...
@@ -9,7 +10,6 @@
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.Completion
;
using
Microsoft.CodeAnalysis.PooledObjects
;
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Shared.Utilities
;
using
Roslyn.Utilities
;
...
...
@@ -18,7 +18,7 @@ namespace Microsoft.CodeAnalysis.Editor.Completion.FileSystem
internal
sealed
class
GlobalAssemblyCacheCompletionHelper
{
private
static
readonly
Lazy
<
List
<
string
>>
s_lazyAssemblySimpleNames
=
new
Lazy
<
List
<
string
>>(()
=>
GlobalAssemblyCache
.
Instance
.
GetAssemblySimpleNames
().
ToList
());
new
Lazy
<
List
<
string
>>(()
=>
Scripting
::
Microsoft
.
CodeAnalysis
.
GlobalAssemblyCache
.
Instance
.
GetAssemblySimpleNames
().
ToList
());
private
readonly
CompletionItemRules
_itemRules
;
...
...
@@ -61,7 +61,7 @@ internal ImmutableArray<CompletionItem> GetItems(string directoryPath, Cancellat
private
IEnumerable
<
AssemblyIdentity
>
GetAssemblyIdentities
(
string
partialName
)
{
return
IOUtilities
.
PerformIO
(()
=>
GlobalAssemblyCache
.
Instance
.
GetAssemblyIdentities
(
partialName
),
return
IOUtilities
.
PerformIO
(()
=>
Scripting
::
Microsoft
.
CodeAnalysis
.
GlobalAssemblyCache
.
Instance
.
GetAssemblyIdentities
(
partialName
),
SpecializedCollections
.
EmptyEnumerable
<
AssemblyIdentity
>());
}
}
...
...
src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpBuild.cs
浏览文件 @
0b79b9f6
...
...
@@ -38,7 +38,7 @@ static void Main(string[] args)
// TODO: Validate build works as expected
}
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18299"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Build
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Build
)]
public
void
BuildWithCommandLine
()
{
VisualStudio
.
SolutionExplorer
.
SaveAll
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录