Skip to content

Commit

Permalink
[msbuild] Merge the CreateEmbeddedResources[TaskBase] classes. (#19631)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Dec 14, 2023
1 parent afd8d23 commit 233b01a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
22 changes: 0 additions & 22 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/CreateEmbeddedResources.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#nullable disable

namespace Xamarin.MacDev.Tasks {
public abstract class CreateEmbeddedResourcesTaskBase : XamarinTask {
public class CreateEmbeddedResources : XamarinTask {
[Required]
public ITaskItem [] BundleResources { get; set; }

Expand Down Expand Up @@ -38,6 +38,17 @@ static string EscapeMangledResource (string name)

public override bool Execute ()
{
if (ShouldExecuteRemotely ()) {
foreach (var bundleResource in this.BundleResources) {
var logicalName = bundleResource.GetMetadata ("LogicalName");

if (!string.IsNullOrEmpty (logicalName)) {
logicalName = logicalName.Replace ("\\", "/");
bundleResource.SetMetadata ("LogicalName", logicalName);
}
}
}

EmbeddedResources = new ITaskItem [BundleResources.Length];

for (int i = 0; i < BundleResources.Length; i++) {
Expand Down

6 comments on commit 233b01a

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.