Skip to content

Commit c73302c

Browse files
akoeplingerjonpryor
authored andcommitted
Fix mono master build (#112)
Properly use `nunit.framework.dll` from NuGet packages. Mono 4.9 changes `nunit.framework.dll` so that all types and members are `[Obsolete(IsError=true)]`, i.e. referencing them results in e.g.: GrefsTest.cs(12,3): error CS0619: `NUnit.Framework.TestFixtureAttribute' is obsolete: `The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.' Some project files were properly using the NuGet package, but not all of them. Fix all of the project files so that the NuGet package's `nunit.framework.dll` is correctly used. Additionally, set `$(DebugType)` to `Full` in `TestJVM.csproj`, to work around a [Roslyn bug][0]. [0]: https://bugzilla.xamarin.com/show_bug.cgi?id=51175
1 parent 769f944 commit c73302c

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

src/Java.Interop.Dynamic/Tests/Java.Interop.Dynamic-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<ItemGroup>
3838
<Reference Include="System" />
3939
<Reference Include="nunit.framework">
40-
<HintPath>..\..\..\lib\NUnit-2.6.3\bin\nunit.framework.dll</HintPath>
40+
<HintPath>..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
4141
</Reference>
4242
<Reference Include="Microsoft.CSharp" />
4343
</ItemGroup>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
<ItemGroup>
3232
<Reference Include="System" />
3333
<Reference Include="nunit.framework">
34-
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
35-
<Package>nunit</Package>
34+
<HintPath>..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
3635
</Reference>
3736
<Reference Include="System.Xml" />
3837
</ItemGroup>
@@ -54,4 +53,4 @@
5453
</ProjectReference>
5554
</ItemGroup>
5655
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
57-
</Project>
56+
</Project>

tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<ItemGroup>
3535
<Reference Include="System" />
3636
<Reference Include="nunit.framework">
37-
<HintPath>..\..\lib\NUnit-2.6.3\bin\nunit.framework.dll</HintPath>
37+
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
3838
</Reference>
3939
</ItemGroup>
4040
<ItemGroup>
@@ -62,4 +62,4 @@
6262
<Name>TestJVM</Name>
6363
</ProjectReference>
6464
</ItemGroup>
65-
</Project>
65+
</Project>

tests/TestJVM/TestJVM.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
</PropertyGroup>
1414
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1515
<DebugSymbols>true</DebugSymbols>
16+
<DebugType>full</DebugType>
1617
<OutputPath>..\..\bin\TestDebug</OutputPath>
1718
<ErrorReport>prompt</ErrorReport>
1819
<DefineTrace>false</DefineTrace>
@@ -38,7 +39,7 @@
3839
<ItemGroup>
3940
<Reference Include="System" />
4041
<Reference Include="nunit.framework">
41-
<HintPath>..\..\..\lib\NUnit-2.6.3\bin\nunit.framework.dll</HintPath>
42+
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
4243
</Reference>
4344
</ItemGroup>
4445
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

tools/generator/Tests/generator-Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
<Reference Include="System" />
3636
<Reference Include="System.Xml" />
3737
<Reference Include="nunit.framework">
38-
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
39-
<Package>nunit</Package>
38+
<HintPath>..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
4039
</Reference>
4140
</ItemGroup>
4241
<ItemGroup>

tools/logcat-parse/Tests/LogcatParse-Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
</PropertyGroup>
3232
<ItemGroup>
3333
<Reference Include="System" />
34-
<Reference Include="nunit.framework" />
34+
<Reference Include="nunit.framework">
35+
<HintPath>..\..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
36+
</Reference>
3537
</ItemGroup>
3638
<ItemGroup>
3739
<Compile Include="GrefsTest.cs" />

0 commit comments

Comments
 (0)