Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
cdff572b
R
runtime
项目概览
dotNET Platform
/
runtime
大约 1 年 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cdff572b
编写于
7月 18, 2023
作者:
M
Marek Fišera
提交者:
GitHub
7月 18, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix treating dotnet.wasm or dotnet.native.wasm as native asset (#89079)
上级
87249338
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
4 deletion
+15
-4
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
...ET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
+15
-4
未找到文件。
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
浏览文件 @
cdff572b
...
...
@@ -3,12 +3,10 @@
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.IO
;
using
System.Linq
;
using
Microsoft.Build.Framework
;
using
Microsoft.Build.Utilities
;
using
Microsoft.NET.Sdk.WebAssembly
;
namespace
Microsoft.NET.Sdk.WebAssembly
;
...
...
@@ -265,6 +263,7 @@ public override bool Execute()
ApplyPublishProperties
(
newDotNetWasm
);
nativeStaticWebAssets
.
Add
(
newDotNetWasm
);
if
(
resolvedNativeAssetToPublish
.
TryGetValue
(
"dotnet.native.wasm"
,
out
var
resolved
))
{
filesToRemove
.
Add
(
resolved
);
...
...
@@ -592,7 +591,14 @@ private void ApplyPublishProperties(ITaskItem newAsemblyAsset)
continue
;
}
var
fileName
=
candidate
.
GetMetadata
(
"FileName"
);
var
extension
=
candidate
.
GetMetadata
(
"Extension"
);
if
(
string
.
Equals
(
candidate
.
GetMetadata
(
"AssetType"
),
"native"
,
StringComparison
.
Ordinal
)
&&
(
fileName
==
"dotnet"
||
fileName
==
"dotnet.native"
)
&&
extension
==
".wasm"
)
{
ResolveAsNativeAsset
(
Log
,
resolvedNativeAssetToPublish
,
candidate
,
extension
);
continue
;
}
if
(
string
.
Equals
(
extension
,
".dll"
,
StringComparison
.
Ordinal
)
||
string
.
Equals
(
extension
,
Utils
.
WebcilInWasmExtension
,
StringComparison
.
Ordinal
))
{
var
culture
=
candidate
.
GetMetadata
(
"Culture"
);
...
...
@@ -643,6 +649,12 @@ private void ApplyPublishProperties(ITaskItem newAsemblyAsset)
// Capture all the native unfiltered assets since we need to process them to determine what static web assets need to get
// upgraded
if
(
string
.
Equals
(
candidate
.
GetMetadata
(
"AssetType"
),
"native"
,
StringComparison
.
Ordinal
))
{
ResolveAsNativeAsset
(
Log
,
resolvedNativeAssetToPublish
,
candidate
,
extension
);
continue
;
}
static
void
ResolveAsNativeAsset
(
TaskLoggingHelper
log
,
Dictionary
<
string
,
ITaskItem
>
resolvedNativeAssetToPublish
,
ITaskItem
candidate
,
string
extension
)
{
var
candidateName
=
$"
{
candidate
.
GetMetadata
(
"FileName"
)}{
extension
}
"
;
if
(!
resolvedNativeAssetToPublish
.
ContainsKey
(
candidateName
))
...
...
@@ -651,9 +663,8 @@ private void ApplyPublishProperties(ITaskItem newAsemblyAsset)
}
else
{
L
og
.
LogMessage
(
MessageImportance
.
Low
,
"Duplicate candidate '{0}' found in ResolvedFilesToPublish"
,
candidate
.
ItemSpec
);
l
og
.
LogMessage
(
MessageImportance
.
Low
,
"Duplicate candidate '{0}' found in ResolvedFilesToPublish"
,
candidate
.
ItemSpec
);
}
continue
;
}
#pragma warning restore CA1864
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录