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

Commit d6a019c

Browse files
StephaneDelcroixPureWeen
authored andcommitted
[XamlG] only use forward slashes in XamlResource paths (#1251)
1 parent 30711e1 commit d6a019c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Xamarin.Forms.Build.Tasks/XamlGTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ internal static void GenerateCode(string rootType, string rootNs, CodeTypeRefere
152152
ccu.AssemblyCustomAttributes.Add(
153153
new CodeAttributeDeclaration(new CodeTypeReference($"global::{typeof(XamlResourceIdAttribute).FullName}"),
154154
new CodeAttributeArgument(new CodePrimitiveExpression(resourceId)),
155-
new CodeAttributeArgument(new CodePrimitiveExpression(targetPath)),
155+
new CodeAttributeArgument(new CodePrimitiveExpression(targetPath.Replace('\\', '/'))), //use forward slashes, paths are uris-like
156156
new CodeAttributeArgument(new CodeTypeOfExpression($"global::{rootNs}.{rootType}"))
157157
));
158158
var declNs = new CodeNamespace(rootNs);

0 commit comments

Comments
 (0)