[build] Copy templates to lowercase path on Linux#5873
[build] Copy templates to lowercase path on Linux#5873pjcollins merged 3 commits intodotnet:mainfrom
Conversation
Context: https://github.com/dotnet/sdk/issues/16946 Copy our template workload pack to a lowercase destination so that it can be detected and used when building and testing on Linux.
| <Copy SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" /> | ||
| <!-- Copy template packs to lowercase destination when running on Linux --> | ||
| <Copy Condition="'$(HostOS)' != 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" /> | ||
| <Copy Condition="'$(HostOS)' == 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFiles="@(_WLTemplates->'%(Filename)'->ToLower()->'$(DotNetPreviewPath)template-packs\%(Identity)')" /> |
There was a problem hiding this comment.
Sounds good, we can always copy to a lowercase location. I am also hoping to wait for a response on the issue or to chat about this quickly on Thursday to see if we should change the template pack ID / version (here and in macios) instead. If there won't be SDK changes coming that will process the packs regardless of casing then we should probably make that change instead.
There was a problem hiding this comment.
Could someone explain that DestinationFiles expression to me? I've never seen multiple -> constructs before. Does the rightmost %(Identity) apply to the "intermediate" list resulting from @(_WLTemplates->'%(Filename)'->ToLower()), or is it %(_WLTemplates.Identity)?
There was a problem hiding this comment.
The %(Identity) in this case will be the product of the transform plus the item function, so the value of
@(_WLTemplates->'%(Filename)'->ToLower()) best summarizes it.
Co-authored-by: WonYoung Choi <wy80.choi@samsung.com>
|
Assuming this works everywhere I think we can merge it temporarily, or we can wait for a potential resolution to https://github.com/dotnet/sdk/issues/16946. |
Context: https://github.com/dotnet/sdk/issues/16946 Copy our template workload pack to a lowercase destination so that it can be detected and used when building and testing on Linux.

Context: https://github.com/dotnet/sdk/issues/16946
Copy our template workload pack to a lowercase destination so that it
can be detected and used when building and testing on Linux.