Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
wpf
提交
c5cfbbfd
W
wpf
项目概览
dotNET Platform
/
wpf
9 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wpf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c5cfbbfd
编写于
8月 22, 2019
作者:
R
Ryland 41491307+ryalanms@users.noreply.github.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove PKT for mscorlib to allow PathAssemblyResolver to return most recent assembly version
上级
05ce539a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
1 deletion
+39
-1
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj
.../src/PresentationBuildTasks/PresentationBuildTasks.csproj
+3
-0
src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs
....Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RetargetablePathAssemblyResolver.cs
...System/Windows/Markup/RetargetablePathAssemblyResolver.cs
+35
-0
未找到文件。
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj
浏览文件 @
c5cfbbfd
...
...
@@ -98,6 +98,9 @@
<Compile Include="$(WpfSharedDir)\System\Windows\Markup\ReflectionHelper.cs">
<Link>Shared\System\Windows\Markup\ReflectionHelper.cs</Link>
</Compile>
<Compile Include="$(WpfSharedDir)\System\Windows\Markup\RetargetablePathAssemblyResolver.cs">
<Link>Shared\System\Windows\Markup\RetargetablePathAssemblyResolver.cs</Link>
</Compile>
<Compile Include="$(WpfSharedDir)\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs">
<Link>Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs</Link>
</Compile>
...
...
src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs
浏览文件 @
c5cfbbfd
...
...
@@ -62,7 +62,7 @@ internal static void Initialize(IEnumerable<string> assemblyPaths)
// System.Reflection.MetadataLoadContext Assembly cache
_cachedMetadataLoadContextAssemblies
=
new
Dictionary
<
string
,
Assembly
>(
StringComparer
.
OrdinalIgnoreCase
);
_cachedMetadataLoadContextAssembliesByNameNoExtension
=
new
Dictionary
<
string
,
Assembly
>(
StringComparer
.
OrdinalIgnoreCase
);
_metadataLoadContext
=
new
MetadataLoadContext
(
new
PathAssemblyResolver
(
assemblyPaths
),
MscorlibReflectionAssemblyName
);
_metadataLoadContext
=
new
MetadataLoadContext
(
new
Retargetable
PathAssemblyResolver
(
assemblyPaths
),
MscorlibReflectionAssemblyName
);
_localAssemblyName
=
string
.
Empty
;
}
...
...
src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RetargetablePathAssemblyResolver.cs
0 → 100644
浏览文件 @
c5cfbbfd
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using
System.Collections.Generic
;
using
System.IO
;
using
System.Reflection
;
namespace
MS.Internal.Markup
{
public
class
RetargetablePathAssemblyResolver
:
MetadataAssemblyResolver
{
private
PathAssemblyResolver
_pathAssemblyResolver
;
public
RetargetablePathAssemblyResolver
(
IEnumerable
<
string
>
assemblyPaths
)
{
_pathAssemblyResolver
=
new
PathAssemblyResolver
(
assemblyPaths
);
}
public
override
Assembly
Resolve
(
MetadataLoadContext
context
,
AssemblyName
assemblyName
)
{
// PathAssemblyResolver will resolve the target assembly to the highest
// version of the target assembly available in the 'assemblyPaths' assembly
// list, only if the public key token for the target assembly is not set.
// Remove the public key token from 'mscorlib' to allow PathAssemblyResolver
// to resolve the most recent version of 'mscorlib'.
if
(
assemblyName
.
Name
.
Equals
(
ReflectionHelper
.
MscorlibReflectionAssemblyName
))
{
assemblyName
.
SetPublicKeyToken
(
null
);
}
return
_pathAssemblyResolver
.
Resolve
(
context
,
assemblyName
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录