Skip to content

Commit ad693d4

Browse files
[tests] fix SuccessfulAndroidXApp test (#7112)
The `SuccessfulAndroidXApp` test fails to restore with: (Restore target) -> /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/NuGet.targets(131,5): error : Unable to resolve 'Xamarin.AndroidX.AppCompat (>= 1.4.1.1)' for 'MonoAndroid,Version=v12.0'. I looked at 1.4.2.1 of the same NuGet, but both versions have `monoandroid12.0` inside. I noticed in the `.binlog`: NuGet Config files used: /Users/runner/.config/NuGet/NuGet.Config So this test is using the machine-wide `NuGet.config` instead of the one in the root of the `xamarin-android` repo. I made a change to use the correct `NuGet.config`, which appears to solve the problem?
1 parent f51b657 commit ad693d4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/CodeBehindTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,7 @@ string PrepareProject (string testName)
695695
CopyRecursively (TestProjectRootDirectory, temporaryProjectPath, ignore);
696696
CopyRecursively (CommonSampleLibraryRootDirectory, Path.Combine (tempRoot, CommonSampleLibraryName), ignore);
697697
CopyFile (Path.Combine (XABuildPaths.TopDirectory, "Directory.Build.props"), Path.Combine (tempRoot, "Directory.Build.props" ));
698-
if (Builder.UseDotNet) {
699-
XASdkProject.SaveNuGetConfig (tempRoot);
700-
}
698+
XASdkProject.SaveNuGetConfig (tempRoot);
701699
return temporaryProjectPath;
702700
}
703701

0 commit comments

Comments
 (0)