-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build] enable One .NET MSBuild tests #4820
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonathanpeppers
changed the title
[build] enable all One .NET MSBuild tests
[build] enable One .NET MSBuild tests
Jun 15, 2020
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
2 times, most recently
from
June 23, 2020 13:45
3abc19c
to
13aa00a
Compare
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
5 times, most recently
from
July 1, 2020 19:57
7676bbf
to
3570fae
Compare
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
4 times, most recently
from
July 13, 2020 18:09
73b9e93
to
639062f
Compare
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
9 times, most recently
from
July 21, 2020 14:54
23dcb4c
to
95dc5b8
Compare
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
9 times, most recently
from
July 23, 2020 19:28
07d4864
to
5cc8ed7
Compare
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 6, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
This will enable all MSBuild tests in `Xamarin.Android.Build.Tests.dll` except for the new categories: `DotNetIgnore`, `AOT`, `FSharp`, `LibraryProjectZip`, `MkBundle`, `MonoSymbolicate`, `PackagesConfig`, and `StaticProject`. Reasoning: * `AOT` - need Mono AOT support in .NET 5. * `FSharp` - [Xamarin.Android.FSharp.ResourceProvider][0] support needed on .NET 5. * `LibraryProjectZip` - will need future support in Xamarin.Android. * `MkBundle` - may not ever come to .NET 5. * `MonoSymbolicate` - need symbolication support in .NET 5. * `PackagesConfig` - n/a for .NET 5. * `StaticProject` a few tests that were migrated to `Xamarin.Android.Build.Tests` in d447aa6 are ignored for now. This also reworks our build pipeline to run the MSBuild tests across 12 CI machines: * Windows - Node 1 - Legacy * Windows - Node 2 - Legacy * Windows - Node 3 - Legacy * Windows - Node 1 - One .NET * Windows - Node 2 - One .NET * Windows - Node 3 - One .NET * macOS - Node 1 - Legacy * macOS - Node 2 - Legacy * macOS - Node 3 - Legacy * macOS - Node 1 - One .NET * macOS - Node 2 - One .NET * macOS - Node 3 - One .NET Since this is a lot of machines: 1. I moved all the `One .NET` tests to their own phase. 2. The phase only runs when `RunAllTests=true`. This means the `One .NET` tests will run on master, release branches, and Mono bumps. You can manually queue a build to enable `RunAllTests` on a PR. To be completed in another PR, there are still more test assemblies that need to be run under a `dotnet` context: * `Xamarin.Android.Build.Tests.Commercial.dll` * `MSBuildDeviceIntegration.dll` [0]: https://github.com/xamarin/Xamarin.Android.FSharp.ResourceProvider
jonathanpeppers
force-pushed
the
dotnet-msbuild-tests
branch
from
August 6, 2020 15:11
3695c2b
to
015daae
Compare
The PR build here looks OK so far, started a |
jpobst
approved these changes
Aug 6, 2020
*Invert* the MSBuild unit tests & One .NET Relationship: previously,
we would selectively *enable* our MSBuild tests to run under .NET 5+.
Now, run *all* tests under .NET 5+, *except* for the categories:
* `AOT` and `MonoSymbolicate`: requires Mono AOT support in .NET 5
and packaging of required tooling; see also, but not limited to,
<https://github.com/dotnet/runtime/issues/35852>
<https://github.com/dotnet/runtime/issues/36758>
* `FSharp`: [Xamarin.Android.FSharp.ResourceProvider][0] support
is needed to run on .NET 5.
* `LibraryProjectZip`, `StaticProject`: Require future support
within Xamarin.Android, but don't need to be done *before*
inverting the unit test regime.
* `MkBundle`: `mkbundle.exe` might not make it to .NET 5 -- see
also dotnet/runtime#35852 -- and it may be moot with d236af54.
* `PackagesConfig`: .NET 5+ won't support `packages.config` files.
Also rework our build pipeline to run the MSBuild tests across 12
CI machines:
* Windows - Node 1 - Legacy
* Windows - Node 2 - Legacy
* Windows - Node 3 - Legacy
* Windows - Node 1 - One .NET
* Windows - Node 2 - One .NET
* Windows - Node 3 - One .NET
* macOS - Node 1 - Legacy
* macOS - Node 2 - Legacy
* macOS - Node 3 - Legacy
* macOS - Node 1 - One .NET
* macOS - Node 2 - One .NET
* macOS - Node 3 - One .NET
Since this is a lot of machines:
1. I moved all the `One .NET` tests to their own phase.
2. The phase only runs when `RunAllTests=true`. This means the
`One .NET` tests will run on master, release branches, and
Mono bumps.
You can manually queue a build to enable `RunAllTests` on a PR.
To be completed in another PR, there are still more test assemblies
that need to be run under a `dotnet` context:
* `Xamarin.Android.Build.Tests.Commercial.dll`
* `MSBuildDeviceIntegration.dll`
[0]: https://github.com/xamarin/Xamarin.Android.FSharp.ResourceProvider |
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 7, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 7, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 7, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 10, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 10, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 10, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 10, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 10, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 11, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 11, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 11, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 11, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 11, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 12, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 13, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 14, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this pull request
Aug 17, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in dotnet#4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
jonathanpeppers
added a commit
that referenced
this pull request
Aug 18, 2020
There are various tests in `Xamarin.Android.Build.Tests` that execute MSBuild tasks directly. This means the changes in #4820 are not quite complete. We need to actually *run* the tests under .NET Core to see if these tests would pass under a One .NET context. The solution (you would think), would be to make the test assembly `netstandard2.0` so you could run either: > nunit3-console Xamarin.Android.Build.Tests.dll > dotnet test Xamarin.Android.Build.Tests.dll `nunit3-console` would execute the tests under .NET framework/Mono and `dotnet test` would run under .NET Core or .NET 5+. Unfortunately, `nunit3-console` can't run tests from a `netstandard2.0` library! So we multi-target: <TargetFrameworks>net472;net5.0</TargetFrameworks> Unfortunately, the `net5.0` causes MSBuild to fail with: > msbuild Xamarin.Android.sln ... (GetReferenceAssemblyPaths target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks I think there is some expectation to use `dotnet build` for .NET 5 instead. We don't want to move our *entire* build over to `dotnet build` yet (we probably can't!), so instead we can do: <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> This allows `msbuild Xamarin.Android.sln` to continue to work. This might also be something that gets fixed in a future MSBuild version. I updated various `.yaml` definitions so we can run NUnit tests via `nunit3-console` or `dotnet test` as needed. Other things that broke here: * We need `Microsoft.NET.Test.Sdk` for `dotnet test` to work. * `Builder.UseDotNet` can now be set based on a `#if` instead of an NUnit parameter. * `Xamarin.Android.Tools.Aidl` needs to be `netstandard2.0`. This required including a `System.CodeDom` package. * `Xamarin.Android.Build.Tasks` can't use `FSharp.Core` in `netcoreapp3.1`. I just removed it, since it is not used. * Updated various paths to `Xamarin.Android.Build.Tests.dll`. * Usage of System.Drawing crashed on macOS. I replaced this with ImageSharp: https://www.nuget.org/packages/SixLabors.ImageSharp/
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will enable all MSBuild tests in
Xamarin.Android.Build.Tests.dll
except for the new categories:DotNetIgnore
,AOT
,FSharp
,LibraryProjectZip
,MkBundle
,MonoSymbolicate
,PackagesConfig
, andStaticProject
.Reasoning:
AOT
- need Mono AOT support in .NET 5.FSharp
- Xamarin.Android.FSharp.ResourceProvider supportneeded on .NET 5.
LibraryProjectZip
- will need future support in Xamarin.Android.MkBundle
- may not ever come to .NET 5.MonoSymbolicate
- need symbolication support in .NET 5.PackagesConfig
- n/a for .NET 5.StaticProject
a few tests that were migrated toXamarin.Android.Build.Tests
in d447aa6 are ignored for now.This also reworks our build pipeline to run the MSBuild tests across 12
CI machines:
Since this is a lot of machines:
One .NET
tests to their own phase.RunAllTests=true
. This means theOne .NET
tests will run on master, release branches, and Mono bumps. You can manually queue a build to enableRunAllTests
on a PR.To be completed in another PR, there are still more test assemblies
that need to be run under a
dotnet
context:Xamarin.Android.Build.Tests.Commercial.dll
MSBuildDeviceIntegration.dll