Skip to content

Commit e5185fc

Browse files
[tests] Windows not writing AndroidManifest.xml to disk
When debugging this particular test on Windows, it was never writing `AndroidManifest.xml` to disk after the first build. This expression was false, because the times are equal: https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/XamarinProject.cs#L352 Modifying the `AndroidManifest` property to clear the `Timestamp` on the project item, forces the file to be rewritten, and the test now passes on Windows.
1 parent b3e9820 commit e5185fc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,19 @@ public AndroidLinkMode AndroidLinkModeRelease {
111111
set { SetProperty (ReleaseProperties, KnownProperties.AndroidLinkMode, value.ToString ()); }
112112
}
113113

114-
public string AndroidManifest { get; set; }
114+
string androidManifest;
115+
116+
public string AndroidManifest {
117+
get { return androidManifest; }
118+
set {
119+
androidManifest = value;
120+
121+
var item = OtherBuildItems?.FirstOrDefault (i => i.Include() == "Properties\\AndroidManifest.xml");
122+
if (item != null) {
123+
item.Timestamp = null;
124+
}
125+
}
126+
}
115127
public string LayoutMain { get; set; }
116128
public string MainActivity { get; set; }
117129
public string StringsXml { get; set; }

0 commit comments

Comments
 (0)