Skip to content

Commit 66d445c

Browse files
dellis1972jonpryor
authored andcommitted
[build] Upgrade to NUnit 3.11.0 and NUnit.ConsoleRunner 3.9.0 (#66)
[Visual Studio 2019][0] requires an updated NUnit to load and run our NUnit tests. Update to NUnit 3.11.0, NUnit.ConsoleRunner 3.9.0, and NUnit3TestAdapter 3.13.0 to appease Visual Studio. Additionally, when trying to restore packages in the `monodroid` repo within Visual Studio for Mac, we get: Error NU1105 Unable to find project information for 'Xamarin.Android.Tools.AndroidSdk.csproj'. The project file may be invalid or missing targets required for restore. This is because this `$(TargetFrameworkVersion)` was set to `v4.5` and the ones in monodroid are set to `v4.7.2` now. We need to update the `$(TargetFrameworkVersions)` values to v4.7.1 as well. [0]: https://web.archive.org/web/20190307085042/https://visualstudio.microsoft.com/vs/preview
1 parent acabd26 commit 66d445c

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CONFIGURATION := Debug
2-
NUNIT_CONSOLE := packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe
2+
NUNIT_CONSOLE := packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe
33
OS := $(shell uname)
44
RUNTIME := mono --debug=casts
55
V ?= 0

azure-pipelines.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
displayName: 'VsTest - NUnit3'
1717
inputs:
1818
testAssemblyVer2: 'bin\TestDebug\*-Tests.dll'
19-
pathtoCustomTestAdapters: 'packages\NUnit3TestAdapter.3.12.0\build\net35'
19+
pathtoCustomTestAdapters: 'packages\NUnit3TestAdapter.3.13.0\build\net35'
2020
- powershell: |
2121
$hashOfLastVersionChange = & "git" "log" "--follow" "-1" "--pretty=%H" "nuget.version"
2222
$commitsSinceVersionChange = & "git" "rev-list" "--count" "$hashOfLastVersionChange..HEAD"
@@ -44,7 +44,7 @@ jobs:
4444
displayName: 'Build solution Xamarin.Android.Tools.sln'
4545
inputs:
4646
solution: Xamarin.Android.Tools.sln
47-
- script: mono packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe bin/TestDebug/Xamarin.Android.Tools.AndroidSdk-Tests.dll
47+
- script: mono packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe bin/TestDebug/Xamarin.Android.Tools.AndroidSdk-Tests.dll
4848
displayName: Run NUnit Tests
4949
- task: PublishTestResults@2
5050
condition: always()

src/Xamarin.Android.Tools.AndroidSdk/Tests/Xamarin.Android.Tools.AndroidSdk-Tests.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" />
4+
<Import Project="..\..\..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\..\..\packages\NUnit.3.11.0\build\NUnit.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -9,7 +11,7 @@
911
<AppDesignerFolder>Properties</AppDesignerFolder>
1012
<RootNamespace>Xamarin.Android.Tools.Tests</RootNamespace>
1113
<AssemblyName>Xamarin.Android.Tools.AndroidSdk-Tests</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
1315
<FileAlignment>512</FileAlignment>
1416
</PropertyGroup>
1517
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -31,7 +33,7 @@
3133
</PropertyGroup>
3234
<ItemGroup>
3335
<Reference Include="nunit.framework">
34-
<HintPath>..\..\..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
36+
<HintPath>..\..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
3537
</Reference>
3638
<Reference Include="System" />
3739
<Reference Include="System.Core" />
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="NUnit" version="3.2.1" targetFramework="net45" />
4-
<package id="NUnit.Console" version="3.2.1" />
5-
<package id="NUnit.ConsoleRunner" version="3.2.1" />
6-
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.2.1" />
7-
<package id="NUnit3TestAdapter" version="3.12.0" targetFramework="net452" />
3+
<package id="NUnit" version="3.11.0" targetFramework="net452" />
4+
<package id="NUnit.Console" version="3.9.0" targetFramework="net452" />
5+
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net452" />
6+
<package id="NUnit.Extension.NUnitProjectLoader" version="3.5.0" targetFramework="net452" />
7+
<package id="NUnit.Extension.NUnitV2Driver" version="3.6.0" targetFramework="net452" />
8+
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" targetFramework="net452" />
9+
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.3" targetFramework="net452" />
10+
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net452" />
11+
<package id="NUnit3TestAdapter" version="3.13.0" targetFramework="net452" />
812
<package id="Unofficial.Ionic.Zip" version="1.9.1.8" targetFramework="net45" />
913
</packages>

src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<OutputType>Library</OutputType>
88
<RootNamespace>Xamarin.Android.Tools</RootNamespace>
99
<AssemblyName>Xamarin.Android.Tools.AndroidSdk</AssemblyName>
10-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10+
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
1111
<ProductVersion>8.0.30703</ProductVersion>
1212
<SchemaVersion>2.0</SchemaVersion>
1313
<SignAssembly>true</SignAssembly>

0 commit comments

Comments
 (0)