Skip to content

Commit

Permalink
[tests] fix InvalidTargetPlatformVersion for net8.0 (#9110)
Browse files Browse the repository at this point in the history
Context: dotnet/sdk@25b360d

* Use `net8.0` `$(TargetFramework)`

When 60dbcc9 was backported to .NET 8, the accompanying unit test was accidentally targeting .NET 9.

* Don't test for `android33` *or* `android32`

`android33` is valid, so we *could* use `android32` to test an invalid number, however...

dotnet/sdk@25b360d was not backported to .NET 8, so invalid API levels that are older will not
give a `NETSDK1140` error.
  • Loading branch information
jonathanpeppers committed Jul 16, 2024
1 parent 4d3cbd1 commit a0518a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ public void IfAndroidJarDoesNotExistThrowXA5207 ([Values(true, false)] bool buil
}

[Test]
public void InvalidTargetPlatformVersion ([Values ("android33", "android99.0")] string platformVersion)
public void InvalidTargetPlatformVersion ([Values ("android99.0")] string platformVersion)
{
const string targetFramework = "net9.0";
const string targetFramework = "net8.0";
var project = new XamarinAndroidApplicationProject {
TargetFramework = $"{targetFramework}-{platformVersion}",
};
Expand Down

0 comments on commit a0518a1

Please sign in to comment.