Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 208e6ed

Browse files
StephaneDelcroixPureWeen
authored andcommitted
[XamlG] do not mess with path separators (#1250)
1 parent d6a019c commit 208e6ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Xamarin.Forms.Build.Tasks/XamlGTask.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public override bool Execute()
3434

3535
foreach (var xamlFile in XamlFiles) {
3636
var targetPath = Path.Combine(OutputPath, xamlFile.GetMetadata("TargetPath") + ".g.cs");
37+
if (Path.DirectorySeparatorChar == '/' && targetPath.Contains(@"\"))
38+
targetPath = targetPath.Replace('\\','/');
39+
else if (Path.DirectorySeparatorChar == '\\' && targetPath.Contains(@"/"))
40+
targetPath = targetPath.Replace('/', '\\');
3741
result &= Execute(xamlFile, targetPath);
3842
}
3943

0 commit comments

Comments
 (0)