Skip to content

Commit

Permalink
Fix dotnet test Command Not Recognizing NUnit3TestAdapter (#164)
Browse files Browse the repository at this point in the history
* Fix dotnet test run issue

Move reference to NUnit3TestAdapter to ItemGroup without TargetFramework condition

* Reapply the fix after resolving the merge conflict and change the NUnit3TestAdapter version to 4.5.0

* Avoid test runner from skipped net462

Set IsTestProject to true and clean up garbage from old project file.
mobilebilly authored Aug 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 04e14cd commit 60d4fbc
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions src/log4net.Tests/log4net.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,51 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<NoWarn>NETSDK1138;CS1701</NoWarn>
<ProjectType>Local</ProjectType>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)</OutputPath>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<Deterministic>true</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
<!-- suppress analyzer mismatch warning -->
<NoWarn>CS8032</NoWarn>
</PropertyGroup>
<PropertyGroup>
<BaseAddress>285212672</BaseAddress>
<FileAlignment>4096</FileAlignment>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\log4net\log4net.csproj" />
</ItemGroup>
@@ -55,14 +22,14 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Quackers.TestLogger" Version="1.0.24" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime.Remoting" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
</ItemGroup>
<Import Project="../MonoForFramework.targets" />

0 comments on commit 60d4fbc

Please sign in to comment.