summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs')
-rw-r--r--Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs b/Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs
new file mode 100644
index 00000000..a508a558
--- /dev/null
+++ b/Xamarin.Forms.Build.Tasks/FixedCreateCSharpManifestResourceName.cs
@@ -0,0 +1,27 @@
+´╗┐using Microsoft.Build.Framework;
+using Microsoft.Build.Tasks;
+using Microsoft.Build.Utilities;
+
+namespace Xamarin.Forms.Build.Tasks
+{
+ public class FixedCreateCSharpManifestResourceName : CreateCSharpManifestResourceName
+ {
+ [Output]
+ public ITaskItem[] ResourceFilesWithManifestResourceNames { get; set; }
+
+ public override bool Execute()
+ {
+ var ret = base.Execute();
+
+ ResourceFilesWithManifestResourceNames = new TaskItem[ResourceFiles.Length];
+
+ for (var i = 0; i < ResourceFiles.Length; i++)
+ {
+ var copy = new TaskItem(ResourceFiles[i]);
+ copy.SetMetadata("ManifestResourceName", ManifestResourceNames[i].ItemSpec);
+ ResourceFilesWithManifestResourceNames[i] = copy;
+ }
+ return ret;
+ }
+ }
+} \ No newline at end of file